const sr = (n, e) => {
  var t, r;
  if (!Array.isArray(n) || !Array.isArray(e) || n.length !== e.length)
    return !1;
  const i = /* @__PURE__ */ new Map();
  n.forEach((s) => {
    var o;
    i.set(s, ((o = i.get(s)) != null ? o : 0) + 1);
  });
  for (const s of e)
    if (!i.has(s) || (i.set(s, ((t = i.get(s)) != null ? t : 0) - 1), ((r = i.get(s)) != null ? r : 0) < 0))
      return !1;
  return !0;
}, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  equal: sr
}, Symbol.toStringTag, { value: "Module" }));
var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, dt = { exports: {} };
(function(n, e) {
  (function() {
    var t;
    function r(g) {
      var c, x, E = "", A = -1, F;
      if (g && g.length)
        for (F = g.length; (A += 1) < F; )
          c = g.charCodeAt(A), x = A + 1 < F ? g.charCodeAt(A + 1) : 0, 55296 <= c && c <= 56319 && 56320 <= x && x <= 57343 && (c = 65536 + ((c & 1023) << 10) + (x & 1023), A += 1), c <= 127 ? E += String.fromCharCode(c) : c <= 2047 ? E += String.fromCharCode(
            192 | c >>> 6 & 31,
            128 | c & 63
          ) : c <= 65535 ? E += String.fromCharCode(
            224 | c >>> 12 & 15,
            128 | c >>> 6 & 63,
            128 | c & 63
          ) : c <= 2097151 && (E += String.fromCharCode(
            240 | c >>> 18 & 7,
            128 | c >>> 12 & 63,
            128 | c >>> 6 & 63,
            128 | c & 63
          ));
      return E;
    }
    function i(g) {
      var c, x, E, A, F, I = [], p;
      if (c = x = E = A = F = 0, g && g.length)
        for (p = g.length, g += ""; c < p; )
          E = g.charCodeAt(c), x += 1, E < 128 ? (I[x] = String.fromCharCode(E), c += 1) : E > 191 && E < 224 ? (A = g.charCodeAt(c + 1), I[x] = String.fromCharCode((E & 31) << 6 | A & 63), c += 2) : (A = g.charCodeAt(c + 1), F = g.charCodeAt(c + 2), I[x] = String.fromCharCode((E & 15) << 12 | (A & 63) << 6 | F & 63), c += 3);
      return I.join("");
    }
    function s(g, c) {
      var x = (g & 65535) + (c & 65535), E = (g >> 16) + (c >> 16) + (x >> 16);
      return E << 16 | x & 65535;
    }
    function o(g, c) {
      return g << c | g >>> 32 - c;
    }
    function a(g, c) {
      for (var x = c ? "0123456789ABCDEF" : "0123456789abcdef", E = "", A, F = 0, I = g.length; F < I; F += 1)
        A = g.charCodeAt(F), E += x.charAt(A >>> 4 & 15) + x.charAt(A & 15);
      return E;
    }
    function f(g) {
      var c, x = g.length * 32, E = "";
      for (c = 0; c < x; c += 8)
        E += String.fromCharCode(g[c >> 5] >>> 24 - c % 32 & 255);
      return E;
    }
    function T(g) {
      var c, x = g.length * 32, E = "";
      for (c = 0; c < x; c += 8)
        E += String.fromCharCode(g[c >> 5] >>> c % 32 & 255);
      return E;
    }
    function C(g) {
      var c, x = g.length * 8, E = Array(g.length >> 2), A = E.length;
      for (c = 0; c < A; c += 1)
        E[c] = 0;
      for (c = 0; c < x; c += 8)
        E[c >> 5] |= (g.charCodeAt(c / 8) & 255) << c % 32;
      return E;
    }
    function Z(g) {
      var c, x = g.length * 8, E = Array(g.length >> 2), A = E.length;
      for (c = 0; c < A; c += 1)
        E[c] = 0;
      for (c = 0; c < x; c += 8)
        E[c >> 5] |= (g.charCodeAt(c / 8) & 255) << 24 - c % 32;
      return E;
    }
    function W(g, c) {
      var x = c.length, E = Array(), A, F, I, p, D, B, V, _;
      for (B = Array(Math.ceil(g.length / 2)), p = B.length, A = 0; A < p; A += 1)
        B[A] = g.charCodeAt(A * 2) << 8 | g.charCodeAt(A * 2 + 1);
      for (; B.length > 0; ) {
        for (D = Array(), I = 0, A = 0; A < B.length; A += 1)
          I = (I << 16) + B[A], F = Math.floor(I / x), I -= F * x, (D.length > 0 || F > 0) && (D[D.length] = F);
        E[E.length] = I, B = D;
      }
      for (V = "", A = E.length - 1; A >= 0; A--)
        V += c.charAt(E[A]);
      for (_ = Math.ceil(g.length * 8 / (Math.log(c.length) / Math.log(2))), A = V.length; A < _; A += 1)
        V = c[0] + V;
      return V;
    }
    function N(g, c) {
      var x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", E = "", A = g.length, F, I, p;
      for (c = c || "=", F = 0; F < A; F += 3)
        for (p = g.charCodeAt(F) << 16 | (F + 1 < A ? g.charCodeAt(F + 1) << 8 : 0) | (F + 2 < A ? g.charCodeAt(F + 2) : 0), I = 0; I < 4; I += 1)
          F * 8 + I * 6 > g.length * 8 ? E += c : E += x.charAt(p >>> 6 * (3 - I) & 63);
      return E;
    }
    t = {
      VERSION: "1.0.6",
      Base64: function() {
        var g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = "=", x = !0;
        this.encode = function(E) {
          var A, F, I, p = "", D = E.length;
          for (c = c || "=", E = x ? r(E) : E, A = 0; A < D; A += 3)
            for (I = E.charCodeAt(A) << 16 | (A + 1 < D ? E.charCodeAt(A + 1) << 8 : 0) | (A + 2 < D ? E.charCodeAt(A + 2) : 0), F = 0; F < 4; F += 1)
              A * 8 + F * 6 > D * 8 ? p += c : p += g.charAt(I >>> 6 * (3 - F) & 63);
          return p;
        }, this.decode = function(E) {
          var A, F, I, p, D, B, V, _, l, O, u = "", h = [];
          if (!E)
            return E;
          A = O = 0, E = E.replace(new RegExp("\\" + c, "gi"), "");
          do
            D = g.indexOf(E.charAt(A += 1)), B = g.indexOf(E.charAt(A += 1)), V = g.indexOf(E.charAt(A += 1)), _ = g.indexOf(E.charAt(A += 1)), l = D << 18 | B << 12 | V << 6 | _, F = l >> 16 & 255, I = l >> 8 & 255, p = l & 255, O += 1, V === 64 ? h[O] = String.fromCharCode(F) : _ === 64 ? h[O] = String.fromCharCode(F, I) : h[O] = String.fromCharCode(F, I, p);
          while (A < E.length);
          return u = h.join(""), u = x ? i(u) : u, u;
        }, this.setPad = function(E) {
          return c = E || c, this;
        }, this.setTab = function(E) {
          return g = E || g, this;
        }, this.setUTF8 = function(E) {
          return typeof E == "boolean" && (x = E), this;
        };
      },
      CRC32: function(g) {
        var c = 0, x = 0, E = 0, A, F, I;
        for (g = r(g), A = [
          "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 ",
          "79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 ",
          "84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F ",
          "63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD ",
          "A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC ",
          "51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 ",
          "B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 ",
          "06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 ",
          "E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 ",
          "12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 ",
          "D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 ",
          "33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 ",
          "CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 ",
          "9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E ",
          "7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D ",
          "806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 ",
          "60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA ",
          "AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 ",
          "5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 ",
          "B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 ",
          "05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 ",
          "F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA ",
          "11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 ",
          "D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F ",
          "30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E ",
          "C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D"
        ].join(""), c = c ^ -1, F = 0, I = g.length; F < I; F += 1)
          E = (c ^ g.charCodeAt(F)) & 255, x = "0x" + A.substr(E * 9, 8), c = c >>> 8 ^ x;
        return (c ^ -1) >>> 0;
      },
      MD5: function(g) {
        var c = g && typeof g.uppercase == "boolean" ? g.uppercase : !1, x = g && typeof g.pad == "string" ? g.pad : "=", E = g && typeof g.utf8 == "boolean" ? g.utf8 : !0;
        this.hex = function(l) {
          return a(A(l), c);
        }, this.b64 = function(l) {
          return N(A(l), x);
        }, this.any = function(l, O) {
          return W(A(l), O);
        }, this.raw = function(l) {
          return A(l);
        }, this.hex_hmac = function(l, O) {
          return a(F(l, O), c);
        }, this.b64_hmac = function(l, O) {
          return N(F(l, O), x);
        }, this.any_hmac = function(l, O, u) {
          return W(F(l, O), u);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(l) {
          return typeof l == "boolean" && (c = l), this;
        }, this.setPad = function(l) {
          return x = l || x, this;
        }, this.setUTF8 = function(l) {
          return typeof l == "boolean" && (E = l), this;
        };
        function A(l) {
          return l = E ? r(l) : l, T(I(C(l), l.length * 8));
        }
        function F(l, O) {
          var u, h, d, y, R;
          for (l = E ? r(l) : l, O = E ? r(O) : O, u = C(l), u.length > 16 && (u = I(u, l.length * 8)), h = Array(16), d = Array(16), R = 0; R < 16; R += 1)
            h[R] = u[R] ^ 909522486, d[R] = u[R] ^ 1549556828;
          return y = I(h.concat(C(O)), 512 + O.length * 8), T(I(d.concat(y), 512 + 128));
        }
        function I(l, O) {
          var u, h, d, y, R, m = 1732584193, v = -271733879, w = -1732584194, b = 271733878;
          for (l[O >> 5] |= 128 << O % 32, l[(O + 64 >>> 9 << 4) + 14] = O, u = 0; u < l.length; u += 16)
            h = m, d = v, y = w, R = b, m = D(m, v, w, b, l[u + 0], 7, -680876936), b = D(b, m, v, w, l[u + 1], 12, -389564586), w = D(w, b, m, v, l[u + 2], 17, 606105819), v = D(v, w, b, m, l[u + 3], 22, -1044525330), m = D(m, v, w, b, l[u + 4], 7, -176418897), b = D(b, m, v, w, l[u + 5], 12, 1200080426), w = D(w, b, m, v, l[u + 6], 17, -1473231341), v = D(v, w, b, m, l[u + 7], 22, -45705983), m = D(m, v, w, b, l[u + 8], 7, 1770035416), b = D(b, m, v, w, l[u + 9], 12, -1958414417), w = D(w, b, m, v, l[u + 10], 17, -42063), v = D(v, w, b, m, l[u + 11], 22, -1990404162), m = D(m, v, w, b, l[u + 12], 7, 1804603682), b = D(b, m, v, w, l[u + 13], 12, -40341101), w = D(w, b, m, v, l[u + 14], 17, -1502002290), v = D(v, w, b, m, l[u + 15], 22, 1236535329), m = B(m, v, w, b, l[u + 1], 5, -165796510), b = B(b, m, v, w, l[u + 6], 9, -1069501632), w = B(w, b, m, v, l[u + 11], 14, 643717713), v = B(v, w, b, m, l[u + 0], 20, -373897302), m = B(m, v, w, b, l[u + 5], 5, -701558691), b = B(b, m, v, w, l[u + 10], 9, 38016083), w = B(w, b, m, v, l[u + 15], 14, -660478335), v = B(v, w, b, m, l[u + 4], 20, -405537848), m = B(m, v, w, b, l[u + 9], 5, 568446438), b = B(b, m, v, w, l[u + 14], 9, -1019803690), w = B(w, b, m, v, l[u + 3], 14, -187363961), v = B(v, w, b, m, l[u + 8], 20, 1163531501), m = B(m, v, w, b, l[u + 13], 5, -1444681467), b = B(b, m, v, w, l[u + 2], 9, -51403784), w = B(w, b, m, v, l[u + 7], 14, 1735328473), v = B(v, w, b, m, l[u + 12], 20, -1926607734), m = V(m, v, w, b, l[u + 5], 4, -378558), b = V(b, m, v, w, l[u + 8], 11, -2022574463), w = V(w, b, m, v, l[u + 11], 16, 1839030562), v = V(v, w, b, m, l[u + 14], 23, -35309556), m = V(m, v, w, b, l[u + 1], 4, -1530992060), b = V(b, m, v, w, l[u + 4], 11, 1272893353), w = V(w, b, m, v, l[u + 7], 16, -155497632), v = V(v, w, b, m, l[u + 10], 23, -1094730640), m = V(m, v, w, b, l[u + 13], 4, 681279174), b = V(b, m, v, w, l[u + 0], 11, -358537222), w = V(w, b, m, v, l[u + 3], 16, -722521979), v = V(v, w, b, m, l[u + 6], 23, 76029189), m = V(m, v, w, b, l[u + 9], 4, -640364487), b = V(b, m, v, w, l[u + 12], 11, -421815835), w = V(w, b, m, v, l[u + 15], 16, 530742520), v = V(v, w, b, m, l[u + 2], 23, -995338651), m = _(m, v, w, b, l[u + 0], 6, -198630844), b = _(b, m, v, w, l[u + 7], 10, 1126891415), w = _(w, b, m, v, l[u + 14], 15, -1416354905), v = _(v, w, b, m, l[u + 5], 21, -57434055), m = _(m, v, w, b, l[u + 12], 6, 1700485571), b = _(b, m, v, w, l[u + 3], 10, -1894986606), w = _(w, b, m, v, l[u + 10], 15, -1051523), v = _(v, w, b, m, l[u + 1], 21, -2054922799), m = _(m, v, w, b, l[u + 8], 6, 1873313359), b = _(b, m, v, w, l[u + 15], 10, -30611744), w = _(w, b, m, v, l[u + 6], 15, -1560198380), v = _(v, w, b, m, l[u + 13], 21, 1309151649), m = _(m, v, w, b, l[u + 4], 6, -145523070), b = _(b, m, v, w, l[u + 11], 10, -1120210379), w = _(w, b, m, v, l[u + 2], 15, 718787259), v = _(v, w, b, m, l[u + 9], 21, -343485551), m = s(m, h), v = s(v, d), w = s(w, y), b = s(b, R);
          return Array(m, v, w, b);
        }
        function p(l, O, u, h, d, y) {
          return s(o(s(s(O, l), s(h, y)), d), u);
        }
        function D(l, O, u, h, d, y, R) {
          return p(O & u | ~O & h, l, O, d, y, R);
        }
        function B(l, O, u, h, d, y, R) {
          return p(O & h | u & ~h, l, O, d, y, R);
        }
        function V(l, O, u, h, d, y, R) {
          return p(O ^ u ^ h, l, O, d, y, R);
        }
        function _(l, O, u, h, d, y, R) {
          return p(u ^ (O | ~h), l, O, d, y, R);
        }
      },
      SHA1: function(g) {
        var c = g && typeof g.uppercase == "boolean" ? g.uppercase : !1, x = g && typeof g.pad == "string" ? g.pad : "=", E = g && typeof g.utf8 == "boolean" ? g.utf8 : !0;
        this.hex = function(B) {
          return a(A(B), c);
        }, this.b64 = function(B) {
          return N(A(B), x);
        }, this.any = function(B, V) {
          return W(A(B), V);
        }, this.raw = function(B) {
          return A(B);
        }, this.hex_hmac = function(B, V) {
          return a(F(B, V));
        }, this.b64_hmac = function(B, V) {
          return N(F(B, V), x);
        }, this.any_hmac = function(B, V, _) {
          return W(F(B, V), _);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(B) {
          return typeof B == "boolean" && (c = B), this;
        }, this.setPad = function(B) {
          return x = B || x, this;
        }, this.setUTF8 = function(B) {
          return typeof B == "boolean" && (E = B), this;
        };
        function A(B) {
          return B = E ? r(B) : B, f(I(Z(B), B.length * 8));
        }
        function F(B, V) {
          var _, l, O, u, h;
          for (B = E ? r(B) : B, V = E ? r(V) : V, _ = Z(B), _.length > 16 && (_ = I(_, B.length * 8)), l = Array(16), O = Array(16), u = 0; u < 16; u += 1)
            l[u] = _[u] ^ 909522486, O[u] = _[u] ^ 1549556828;
          return h = I(l.concat(Z(V)), 512 + V.length * 8), f(I(O.concat(h), 512 + 160));
        }
        function I(B, V) {
          var _, l, O, u, h, d, y, R, m = Array(80), v = 1732584193, w = -271733879, b = -1732584194, X = 271733878, K = -1009589776;
          for (B[V >> 5] |= 128 << 24 - V % 32, B[(V + 64 >> 9 << 4) + 15] = V, _ = 0; _ < B.length; _ += 16) {
            for (u = v, h = w, d = b, y = X, R = K, l = 0; l < 80; l += 1)
              l < 16 ? m[l] = B[_ + l] : m[l] = o(m[l - 3] ^ m[l - 8] ^ m[l - 14] ^ m[l - 16], 1), O = s(
                s(o(v, 5), p(l, w, b, X)),
                s(s(K, m[l]), D(l))
              ), K = X, X = b, b = o(w, 30), w = v, v = O;
            v = s(v, u), w = s(w, h), b = s(b, d), X = s(X, y), K = s(K, R);
          }
          return Array(v, w, b, X, K);
        }
        function p(B, V, _, l) {
          return B < 20 ? V & _ | ~V & l : B < 40 ? V ^ _ ^ l : B < 60 ? V & _ | V & l | _ & l : V ^ _ ^ l;
        }
        function D(B) {
          return B < 20 ? 1518500249 : B < 40 ? 1859775393 : B < 60 ? -1894007588 : -899497514;
        }
      },
      SHA256: function(g) {
        g && typeof g.uppercase == "boolean" && g.uppercase;
        var c = g && typeof g.pad == "string" ? g.pad : "=", x = g && typeof g.utf8 == "boolean" ? g.utf8 : !0, E;
        this.hex = function(h) {
          return a(A(h, x));
        }, this.b64 = function(h) {
          return N(A(h, x), c);
        }, this.any = function(h, d) {
          return W(A(h, x), d);
        }, this.raw = function(h) {
          return A(h, x);
        }, this.hex_hmac = function(h, d) {
          return a(F(h, d));
        }, this.b64_hmac = function(h, d) {
          return N(F(h, d), c);
        }, this.any_hmac = function(h, d, y) {
          return W(F(h, d), y);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(h) {
          return this;
        }, this.setPad = function(h) {
          return c = h || c, this;
        }, this.setUTF8 = function(h) {
          return typeof h == "boolean" && (x = h), this;
        };
        function A(h, d) {
          return h = d ? r(h) : h, f(u(Z(h), h.length * 8));
        }
        function F(h, d) {
          h = x ? r(h) : h, d = x ? r(d) : d;
          var y, R = 0, m = Z(h), v = Array(16), w = Array(16);
          for (m.length > 16 && (m = u(m, h.length * 8)); R < 16; R += 1)
            v[R] = m[R] ^ 909522486, w[R] = m[R] ^ 1549556828;
          return y = u(v.concat(Z(d)), 512 + d.length * 8), f(u(w.concat(y), 512 + 256));
        }
        function I(h, d) {
          return h >>> d | h << 32 - d;
        }
        function p(h, d) {
          return h >>> d;
        }
        function D(h, d, y) {
          return h & d ^ ~h & y;
        }
        function B(h, d, y) {
          return h & d ^ h & y ^ d & y;
        }
        function V(h) {
          return I(h, 2) ^ I(h, 13) ^ I(h, 22);
        }
        function _(h) {
          return I(h, 6) ^ I(h, 11) ^ I(h, 25);
        }
        function l(h) {
          return I(h, 7) ^ I(h, 18) ^ p(h, 3);
        }
        function O(h) {
          return I(h, 17) ^ I(h, 19) ^ p(h, 10);
        }
        E = [
          1116352408,
          1899447441,
          -1245643825,
          -373957723,
          961987163,
          1508970993,
          -1841331548,
          -1424204075,
          -670586216,
          310598401,
          607225278,
          1426881987,
          1925078388,
          -2132889090,
          -1680079193,
          -1046744716,
          -459576895,
          -272742522,
          264347078,
          604807628,
          770255983,
          1249150122,
          1555081692,
          1996064986,
          -1740746414,
          -1473132947,
          -1341970488,
          -1084653625,
          -958395405,
          -710438585,
          113926993,
          338241895,
          666307205,
          773529912,
          1294757372,
          1396182291,
          1695183700,
          1986661051,
          -2117940946,
          -1838011259,
          -1564481375,
          -1474664885,
          -1035236496,
          -949202525,
          -778901479,
          -694614492,
          -200395387,
          275423344,
          430227734,
          506948616,
          659060556,
          883997877,
          958139571,
          1322822218,
          1537002063,
          1747873779,
          1955562222,
          2024104815,
          -2067236844,
          -1933114872,
          -1866530822,
          -1538233109,
          -1090935817,
          -965641998
        ];
        function u(h, d) {
          var y = [
            1779033703,
            -1150833019,
            1013904242,
            -1521486534,
            1359893119,
            -1694144372,
            528734635,
            1541459225
          ], R = new Array(64), m, v, w, b, X, K, M, U, Y, G, j, q;
          for (h[d >> 5] |= 128 << 24 - d % 32, h[(d + 64 >> 9 << 4) + 15] = d, Y = 0; Y < h.length; Y += 16) {
            for (m = y[0], v = y[1], w = y[2], b = y[3], X = y[4], K = y[5], M = y[6], U = y[7], G = 0; G < 64; G += 1)
              G < 16 ? R[G] = h[G + Y] : R[G] = s(s(
                s(O(R[G - 2]), R[G - 7]),
                l(R[G - 15])
              ), R[G - 16]), j = s(s(
                s(s(U, _(X)), D(X, K, M)),
                E[G]
              ), R[G]), q = s(V(m), B(m, v, w)), U = M, M = K, K = X, X = s(b, j), b = w, w = v, v = m, m = s(j, q);
            y[0] = s(m, y[0]), y[1] = s(v, y[1]), y[2] = s(w, y[2]), y[3] = s(b, y[3]), y[4] = s(X, y[4]), y[5] = s(K, y[5]), y[6] = s(M, y[6]), y[7] = s(U, y[7]);
          }
          return y;
        }
      },
      SHA512: function(g) {
        g && typeof g.uppercase == "boolean" && g.uppercase;
        var c = g && typeof g.pad == "string" ? g.pad : "=", x = g && typeof g.utf8 == "boolean" ? g.utf8 : !0, E;
        this.hex = function(h) {
          return a(A(h));
        }, this.b64 = function(h) {
          return N(A(h), c);
        }, this.any = function(h, d) {
          return W(A(h), d);
        }, this.raw = function(h) {
          return A(h);
        }, this.hex_hmac = function(h, d) {
          return a(F(h, d));
        }, this.b64_hmac = function(h, d) {
          return N(F(h, d), c);
        }, this.any_hmac = function(h, d, y) {
          return W(F(h, d), y);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(h) {
          return this;
        }, this.setPad = function(h) {
          return c = h || c, this;
        }, this.setUTF8 = function(h) {
          return typeof h == "boolean" && (x = h), this;
        };
        function A(h) {
          return h = x ? r(h) : h, f(I(Z(h), h.length * 8));
        }
        function F(h, d) {
          h = x ? r(h) : h, d = x ? r(d) : d;
          var y, R = 0, m = Z(h), v = Array(32), w = Array(32);
          for (m.length > 32 && (m = I(m, h.length * 8)); R < 32; R += 1)
            v[R] = m[R] ^ 909522486, w[R] = m[R] ^ 1549556828;
          return y = I(v.concat(Z(d)), 1024 + d.length * 8), f(I(w.concat(y), 1024 + 512));
        }
        function I(h, d) {
          var y, R, m, v = new Array(80), w = new Array(16), b = [
            new p(1779033703, -205731576),
            new p(-1150833019, -2067093701),
            new p(1013904242, -23791573),
            new p(-1521486534, 1595750129),
            new p(1359893119, -1377402159),
            new p(-1694144372, 725511199),
            new p(528734635, -79577749),
            new p(1541459225, 327033209)
          ], X = new p(0, 0), K = new p(0, 0), M = new p(0, 0), U = new p(0, 0), Y = new p(0, 0), G = new p(0, 0), j = new p(0, 0), q = new p(0, 0), $ = new p(0, 0), ot = new p(0, 0), Q = new p(0, 0), tt = new p(0, 0), Jt = new p(0, 0), Ut = new p(0, 0), et = new p(0, 0), rt = new p(0, 0), nt = new p(0, 0);
          for (E === void 0 && (E = [
            new p(1116352408, -685199838),
            new p(1899447441, 602891725),
            new p(-1245643825, -330482897),
            new p(-373957723, -2121671748),
            new p(961987163, -213338824),
            new p(1508970993, -1241133031),
            new p(-1841331548, -1357295717),
            new p(-1424204075, -630357736),
            new p(-670586216, -1560083902),
            new p(310598401, 1164996542),
            new p(607225278, 1323610764),
            new p(1426881987, -704662302),
            new p(1925078388, -226784913),
            new p(-2132889090, 991336113),
            new p(-1680079193, 633803317),
            new p(-1046744716, -815192428),
            new p(-459576895, -1628353838),
            new p(-272742522, 944711139),
            new p(264347078, -1953704523),
            new p(604807628, 2007800933),
            new p(770255983, 1495990901),
            new p(1249150122, 1856431235),
            new p(1555081692, -1119749164),
            new p(1996064986, -2096016459),
            new p(-1740746414, -295247957),
            new p(-1473132947, 766784016),
            new p(-1341970488, -1728372417),
            new p(-1084653625, -1091629340),
            new p(-958395405, 1034457026),
            new p(-710438585, -1828018395),
            new p(113926993, -536640913),
            new p(338241895, 168717936),
            new p(666307205, 1188179964),
            new p(773529912, 1546045734),
            new p(1294757372, 1522805485),
            new p(1396182291, -1651133473),
            new p(1695183700, -1951439906),
            new p(1986661051, 1014477480),
            new p(-2117940946, 1206759142),
            new p(-1838011259, 344077627),
            new p(-1564481375, 1290863460),
            new p(-1474664885, -1136513023),
            new p(-1035236496, -789014639),
            new p(-949202525, 106217008),
            new p(-778901479, -688958952),
            new p(-694614492, 1432725776),
            new p(-200395387, 1467031594),
            new p(275423344, 851169720),
            new p(430227734, -1194143544),
            new p(506948616, 1363258195),
            new p(659060556, -544281703),
            new p(883997877, -509917016),
            new p(958139571, -976659869),
            new p(1322822218, -482243893),
            new p(1537002063, 2003034995),
            new p(1747873779, -692930397),
            new p(1955562222, 1575990012),
            new p(2024104815, 1125592928),
            new p(-2067236844, -1578062990),
            new p(-1933114872, 442776044),
            new p(-1866530822, 593698344),
            new p(-1538233109, -561857047),
            new p(-1090935817, -1295615723),
            new p(-965641998, -479046869),
            new p(-903397682, -366583396),
            new p(-779700025, 566280711),
            new p(-354779690, -840897762),
            new p(-176337025, -294727304),
            new p(116418474, 1914138554),
            new p(174292421, -1563912026),
            new p(289380356, -1090974290),
            new p(460393269, 320620315),
            new p(685471733, 587496836),
            new p(852142971, 1086792851),
            new p(1017036298, 365543100),
            new p(1126000580, -1676669620),
            new p(1288033470, -885112138),
            new p(1501505948, -60457430),
            new p(1607167915, 987167468),
            new p(1816402316, 1246189591)
          ]), R = 0; R < 80; R += 1)
            v[R] = new p(0, 0);
          for (h[d >> 5] |= 128 << 24 - (d & 31), h[(d + 128 >> 10 << 5) + 31] = d, m = h.length, R = 0; R < m; R += 32) {
            for (D(M, b[0]), D(U, b[1]), D(Y, b[2]), D(G, b[3]), D(j, b[4]), D(q, b[5]), D($, b[6]), D(ot, b[7]), y = 0; y < 16; y += 1)
              v[y].h = h[R + 2 * y], v[y].l = h[R + 2 * y + 1];
            for (y = 16; y < 80; y += 1)
              B(et, v[y - 2], 19), V(rt, v[y - 2], 29), _(nt, v[y - 2], 6), tt.l = et.l ^ rt.l ^ nt.l, tt.h = et.h ^ rt.h ^ nt.h, B(et, v[y - 15], 1), B(rt, v[y - 15], 8), _(nt, v[y - 15], 7), Q.l = et.l ^ rt.l ^ nt.l, Q.h = et.h ^ rt.h ^ nt.h, O(v[y], tt, v[y - 7], Q, v[y - 16]);
            for (y = 0; y < 80; y += 1)
              Jt.l = j.l & q.l ^ ~j.l & $.l, Jt.h = j.h & q.h ^ ~j.h & $.h, B(et, j, 14), B(rt, j, 18), V(nt, j, 9), tt.l = et.l ^ rt.l ^ nt.l, tt.h = et.h ^ rt.h ^ nt.h, B(et, M, 28), V(rt, M, 2), V(nt, M, 7), Q.l = et.l ^ rt.l ^ nt.l, Q.h = et.h ^ rt.h ^ nt.h, Ut.l = M.l & U.l ^ M.l & Y.l ^ U.l & Y.l, Ut.h = M.h & U.h ^ M.h & Y.h ^ U.h & Y.h, u(X, ot, tt, Jt, E[y], v[y]), l(K, Q, Ut), D(ot, $), D($, q), D(q, j), l(j, G, X), D(G, Y), D(Y, U), D(U, M), l(M, X, K);
            l(b[0], b[0], M), l(b[1], b[1], U), l(b[2], b[2], Y), l(b[3], b[3], G), l(b[4], b[4], j), l(b[5], b[5], q), l(b[6], b[6], $), l(b[7], b[7], ot);
          }
          for (R = 0; R < 8; R += 1)
            w[2 * R] = b[R].h, w[2 * R + 1] = b[R].l;
          return w;
        }
        function p(h, d) {
          this.h = h, this.l = d;
        }
        function D(h, d) {
          h.h = d.h, h.l = d.l;
        }
        function B(h, d, y) {
          h.l = d.l >>> y | d.h << 32 - y, h.h = d.h >>> y | d.l << 32 - y;
        }
        function V(h, d, y) {
          h.l = d.h >>> y | d.l << 32 - y, h.h = d.l >>> y | d.h << 32 - y;
        }
        function _(h, d, y) {
          h.l = d.l >>> y | d.h << 32 - y, h.h = d.h >>> y;
        }
        function l(h, d, y) {
          var R = (d.l & 65535) + (y.l & 65535), m = (d.l >>> 16) + (y.l >>> 16) + (R >>> 16), v = (d.h & 65535) + (y.h & 65535) + (m >>> 16), w = (d.h >>> 16) + (y.h >>> 16) + (v >>> 16);
          h.l = R & 65535 | m << 16, h.h = v & 65535 | w << 16;
        }
        function O(h, d, y, R, m) {
          var v = (d.l & 65535) + (y.l & 65535) + (R.l & 65535) + (m.l & 65535), w = (d.l >>> 16) + (y.l >>> 16) + (R.l >>> 16) + (m.l >>> 16) + (v >>> 16), b = (d.h & 65535) + (y.h & 65535) + (R.h & 65535) + (m.h & 65535) + (w >>> 16), X = (d.h >>> 16) + (y.h >>> 16) + (R.h >>> 16) + (m.h >>> 16) + (b >>> 16);
          h.l = v & 65535 | w << 16, h.h = b & 65535 | X << 16;
        }
        function u(h, d, y, R, m, v) {
          var w = (d.l & 65535) + (y.l & 65535) + (R.l & 65535) + (m.l & 65535) + (v.l & 65535), b = (d.l >>> 16) + (y.l >>> 16) + (R.l >>> 16) + (m.l >>> 16) + (v.l >>> 16) + (w >>> 16), X = (d.h & 65535) + (y.h & 65535) + (R.h & 65535) + (m.h & 65535) + (v.h & 65535) + (b >>> 16), K = (d.h >>> 16) + (y.h >>> 16) + (R.h >>> 16) + (m.h >>> 16) + (v.h >>> 16) + (X >>> 16);
          h.l = w & 65535 | b << 16, h.h = X & 65535 | K << 16;
        }
      },
      RMD160: function(g) {
        g && typeof g.uppercase == "boolean" && g.uppercase;
        var c = g && typeof g.pad == "string" ? g.pa : "=", x = g && typeof g.utf8 == "boolean" ? g.utf8 : !0, E = [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          7,
          4,
          13,
          1,
          10,
          6,
          15,
          3,
          12,
          0,
          9,
          5,
          2,
          14,
          11,
          8,
          3,
          10,
          14,
          4,
          9,
          15,
          8,
          1,
          2,
          7,
          0,
          6,
          13,
          11,
          5,
          12,
          1,
          9,
          11,
          10,
          0,
          8,
          12,
          4,
          13,
          3,
          7,
          15,
          14,
          5,
          6,
          2,
          4,
          0,
          5,
          9,
          7,
          12,
          2,
          10,
          14,
          1,
          3,
          8,
          11,
          6,
          15,
          13
        ], A = [
          5,
          14,
          7,
          0,
          9,
          2,
          11,
          4,
          13,
          6,
          15,
          8,
          1,
          10,
          3,
          12,
          6,
          11,
          3,
          7,
          0,
          13,
          5,
          10,
          14,
          15,
          8,
          12,
          4,
          9,
          1,
          2,
          15,
          5,
          1,
          3,
          7,
          14,
          6,
          9,
          11,
          8,
          12,
          2,
          10,
          0,
          4,
          13,
          8,
          6,
          4,
          1,
          3,
          11,
          15,
          0,
          5,
          12,
          2,
          13,
          9,
          7,
          10,
          14,
          12,
          15,
          10,
          4,
          1,
          5,
          8,
          7,
          6,
          2,
          13,
          14,
          0,
          3,
          9,
          11
        ], F = [
          11,
          14,
          15,
          12,
          5,
          8,
          7,
          9,
          11,
          13,
          14,
          15,
          6,
          7,
          9,
          8,
          7,
          6,
          8,
          13,
          11,
          9,
          7,
          15,
          7,
          12,
          15,
          9,
          11,
          7,
          13,
          12,
          11,
          13,
          6,
          7,
          14,
          9,
          13,
          15,
          14,
          8,
          13,
          6,
          5,
          12,
          7,
          5,
          11,
          12,
          14,
          15,
          14,
          15,
          9,
          8,
          9,
          14,
          5,
          6,
          8,
          6,
          5,
          12,
          9,
          15,
          5,
          11,
          6,
          8,
          13,
          12,
          5,
          12,
          13,
          14,
          11,
          8,
          5,
          6
        ], I = [
          8,
          9,
          9,
          11,
          13,
          15,
          15,
          5,
          7,
          7,
          8,
          11,
          14,
          14,
          12,
          6,
          9,
          13,
          15,
          7,
          12,
          8,
          9,
          11,
          7,
          7,
          12,
          7,
          6,
          15,
          13,
          11,
          9,
          7,
          15,
          11,
          8,
          6,
          6,
          14,
          12,
          13,
          5,
          14,
          13,
          13,
          7,
          5,
          15,
          5,
          8,
          11,
          14,
          14,
          6,
          14,
          6,
          9,
          12,
          9,
          12,
          5,
          15,
          8,
          8,
          5,
          12,
          9,
          12,
          5,
          14,
          6,
          8,
          13,
          6,
          5,
          15,
          13,
          11,
          11
        ];
        this.hex = function(u) {
          return a(p(u));
        }, this.b64 = function(u) {
          return N(p(u), c);
        }, this.any = function(u, h) {
          return W(p(u), h);
        }, this.raw = function(u) {
          return p(u);
        }, this.hex_hmac = function(u, h) {
          return a(D(u, h));
        }, this.b64_hmac = function(u, h) {
          return N(D(u, h), c);
        }, this.any_hmac = function(u, h, d) {
          return W(D(u, h), d);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(u) {
          return this;
        }, this.setPad = function(u) {
          return typeof u < "u" && (c = u), this;
        }, this.setUTF8 = function(u) {
          return typeof u == "boolean" && (x = u), this;
        };
        function p(u) {
          return u = x ? r(u) : u, B(V(C(u), u.length * 8));
        }
        function D(u, h) {
          u = x ? r(u) : u, h = x ? r(h) : h;
          var d, y, R = C(u), m = Array(16), v = Array(16);
          for (R.length > 16 && (R = V(R, u.length * 8)), d = 0; d < 16; d += 1)
            m[d] = R[d] ^ 909522486, v[d] = R[d] ^ 1549556828;
          return y = V(m.concat(C(h)), 512 + h.length * 8), B(V(v.concat(y), 512 + 160));
        }
        function B(u) {
          var h, d = "", y = u.length * 32;
          for (h = 0; h < y; h += 8)
            d += String.fromCharCode(u[h >> 5] >>> h % 32 & 255);
          return d;
        }
        function V(u, h) {
          var d, y, R, m, v = 1732584193, w = 4023233417, b = 2562383102, X = 271733878, K = 3285377520, M, U, Y, G, j, q, $, ot, Q, tt;
          for (u[h >> 5] |= 128 << h % 32, u[(h + 64 >>> 9 << 4) + 14] = h, m = u.length, R = 0; R < m; R += 16) {
            for (M = q = v, U = $ = w, Y = ot = b, G = Q = X, j = tt = K, y = 0; y <= 79; y += 1)
              d = s(M, _(y, U, Y, G)), d = s(d, u[R + E[y]]), d = s(d, l(y)), d = s(o(d, F[y]), j), M = j, j = G, G = o(Y, 10), Y = U, U = d, d = s(q, _(79 - y, $, ot, Q)), d = s(d, u[R + A[y]]), d = s(d, O(y)), d = s(o(d, I[y]), tt), q = tt, tt = Q, Q = o(ot, 10), ot = $, $ = d;
            d = s(w, s(Y, Q)), w = s(b, s(G, tt)), b = s(X, s(j, q)), X = s(K, s(M, $)), K = s(v, s(U, ot)), v = d;
          }
          return [v, w, b, X, K];
        }
        function _(u, h, d, y) {
          return 0 <= u && u <= 15 ? h ^ d ^ y : 16 <= u && u <= 31 ? h & d | ~h & y : 32 <= u && u <= 47 ? (h | ~d) ^ y : 48 <= u && u <= 63 ? h & y | d & ~y : 64 <= u && u <= 79 ? h ^ (d | ~y) : "rmd160_f: j out of range";
        }
        function l(u) {
          return 0 <= u && u <= 15 ? 0 : 16 <= u && u <= 31 ? 1518500249 : 32 <= u && u <= 47 ? 1859775393 : 48 <= u && u <= 63 ? 2400959708 : 64 <= u && u <= 79 ? 2840853838 : "rmd160_K1: j out of range";
        }
        function O(u) {
          return 0 <= u && u <= 15 ? 1352829926 : 16 <= u && u <= 31 ? 1548603684 : 32 <= u && u <= 47 ? 1836072691 : 48 <= u && u <= 63 ? 2053994217 : 64 <= u && u <= 79 ? 0 : "rmd160_K2: j out of range";
        }
      }
    }, function(g, c) {
      var x = !1;
      x = e, e && typeof xt == "object" && xt && xt === xt.global && (g = xt), typeof c == "function" && typeof c.amd == "object" && c.amd ? c(function() {
        return t;
      }) : x ? n && n.exports === x ? n.exports = t : x.Hashes = t : g.Hashes = t;
    }(this);
  })();
})(dt, dt.exports);
const Be = new dt.exports.Base64(), ae = new dt.exports.MD5({
  uppercase: !0,
  utf8: !0
}), he = new dt.exports.SHA1({
  uppercase: !0,
  utf8: !0
}), ue = new dt.exports.SHA256({
  uppercase: !0,
  utf8: !0
}), fe = new dt.exports.SHA512({
  uppercase: !0,
  utf8: !0
}), le = new dt.exports.RMD160({
  uppercase: !0,
  utf8: !0
}), or = (n) => window && typeof window.btoa == "function" ? window.btoa(n) : Be.encode(n), ar = (n) => window && typeof window.atob == "function" ? window.atob(n) : Be.decode(n), hr = (n, e = !0) => (ae.setUpperCase(e), ae.hex(n)), ur = (n, e = !0) => (he.setUpperCase(e), he.hex(n)), fr = (n, e = !0) => (ue.setUpperCase(e), ue.hex(n)), lr = (n, e = !0) => (fe.setUpperCase(e), fe.hex(n)), cr = (n, e = !0) => (le.setUpperCase(e), le.hex(n)), De = () => {
  const n = [], e = new Array(2).fill("0123456789abcdef").join("");
  for (let r = 0; r < 36; r++) {
    const i = Math.floor(Math.random() * 16);
    n[r] = e.substring(i, i + 1);
  }
  n[14] = "4";
  const t = n[19] & 3 | 8;
  return n[19] = e.substring(t, t + 1), n[8] = "-", n[13] = "-", n[18] = "-", n[23] = "-", n.join("");
}, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Base64Encoding: or,
  Base64Decoding: ar,
  MD5Hash: hr,
  SHA1Hash: ur,
  SHA256Hash: fr,
  SHA512Hash: lr,
  RMD160Hash: cr,
  UUID: De
}, Symbol.toStringTag, { value: "Module" })), dr = (n) => n === null, pr = (n) => n === void 0, Gt = (n) => n != null, ht = (n) => n == null || n === "", pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  isNull: dr,
  isUndefined: pr,
  isExist: Gt,
  isEmpty: ht
}, Symbol.toStringTag, { value: "Module" })), Re = (n, e = 2) => {
  if (e > 10)
    throw new Error("length is too large");
  const t = Math.pow(10, e);
  return Math.round(n * t) / t;
}, Ct = (n, e = 2, t = "0") => {
  const r = typeof n == "string" ? n : n.toString();
  return r.length >= 2 ? r : `${new Array(e - r.length).fill(t).join("")}${r}`;
}, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toFixed: Re,
  toFilled: Ct
}, Symbol.toStringTag, { value: "Module" })), ne = /[\s\n\t]+/g, Ve = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Fe = /^(rgb\((\d{1,3},){2}\d{1,3}\))|(rgba\((\d{1,3},){3}((0(\.\d+)?)|1)\))$/, gt = (n) => {
  let e = n.replace(ne, "");
  const t = {
    red: 255,
    green: 255,
    blue: 255,
    alpha: 1,
    hasAlpha: !1
  };
  if (Ve.test(e)) {
    e = e.replace(/#/g, "").toLocaleLowerCase();
    const r = [];
    for (let i = 0; i < Math.floor(e.length / 2); i++) {
      const s = parseInt(e.substring(2 * i, 2 * i + 2), 16);
      i > 2 ? r.push(Re(s / 255, 2)) : r.push(s);
    }
    t.red = ht(r[0]) ? 255 : r[0], t.green = ht(r[1]) ? 255 : r[1], t.blue = ht(r[2]) ? 255 : r[2], r.length > 3 && (t.alpha = ht(r[3]) ? 1 : r[3], t.hasAlpha = !0);
  } else if (Fe.test(e)) {
    e = e.replace(/[rgba()]+/g, "");
    const r = e.split(",").map((i) => parseInt(i, 10));
    t.red = ht(r[0]) ? 255 : r[0], t.green = ht(r[1]) ? 255 : r[1], t.blue = ht(r[2]) ? 255 : r[2], r.length > 3 && (t.alpha = ht(r[3]) ? 1 : r[3], t.hasAlpha = !0);
  } else
    throw new Error(`${n}: this is not a color string`);
  return t;
}, yt = (n, e, t, r) => {
  const i = [n, e, t];
  return r !== void 0 && i.push(Math.floor(r * 255)), `#${i.map((s) => Ct(s.toString(16), 2)).join("")}`;
}, vt = (n, e, t, r) => r !== void 0 ? `rgba(${n},${e},${t},${r})` : `rgb(${n},${e},${t})`, gr = (n) => {
  const e = n.replace(ne, "");
  if (!Ve.test(e))
    throw new Error(`${n}: this is not a hex string`);
  const t = gt(e);
  return t.hasAlpha ? vt(t.red, t.green, t.blue, t.alpha) : vt(t.red, t.green, t.blue);
}, yr = (n) => {
  const e = n.replace(ne, "");
  if (!Fe.test(e))
    throw new Error(`${n}: this is not a rgb string`);
  const t = gt(e);
  return t.hasAlpha ? yt(t.red, t.green, t.blue, t.alpha) : yt(t.red, t.green, t.blue);
}, ie = (n) => {
  const e = gt(n);
  return (e.red * 299 + e.green * 587 + e.blue * 114) / 255e3 >= 0.5 ? "light" : "dark";
}, vr = (n) => ie(n) === "light", br = (n) => ie(n) === "dark", Ze = (n, e = 0) => {
  const { red: t, green: r, blue: i } = n;
  return e >= 0 ? {
    red: t + Math.floor((255 - t) * e),
    green: r + Math.floor((255 - r) * e),
    blue: i + Math.floor((255 - i) * e)
  } : {
    red: t - Math.floor(t * e),
    green: r - Math.floor(r * e),
    blue: i - Math.floor(i * e)
  };
}, mr = (n, e = 0, t = !1) => {
  const r = gt(n);
  if (e < 0 || e > 1)
    throw new Error(`${e}: level must between 0 and 1`);
  const i = Ze(r, e);
  return t ? r.hasAlpha ? vt(i.red, i.green, i.blue, r.alpha) : vt(i.red, i.green, i.blue) : r.hasAlpha ? yt(i.red, i.green, i.blue, r.alpha) : yt(i.red, i.green, i.blue);
}, wr = (n, e = 0, t = !1) => {
  const r = gt(n);
  if (e < 0 || e > 1)
    throw new Error(`${e}: level must between 0 and 1`);
  const i = Ze(r, -e);
  return t ? r.hasAlpha ? vt(i.red, i.green, i.blue, r.alpha) : vt(i.red, i.green, i.blue) : r.hasAlpha ? yt(i.red, i.green, i.blue, r.alpha) : yt(i.red, i.green, i.blue);
}, Sr = (n, e, t, r = !1) => {
  const i = gt(n), s = gt(e);
  if (t < 1)
    throw new Error(`${t}: steps must more than 1`);
  const o = (s.red - i.red) / t, a = (s.green - i.green) / t, f = (s.blue - i.blue) / t;
  return new Array(t).fill("").map((T, C) => {
    const Z = Math.ceil(o * C + i.red), W = Math.ceil(a * C + i.green), N = Math.ceil(f * C + i.blue), g = Math.ceil(o * (C + 1) + i.red), c = Math.ceil(a * (C + 1) + i.green), x = Math.ceil(f * (C + 1) + i.blue);
    return r ? [vt(Z, W, N), vt(g, c, x)] : [yt(Z, W, N), yt(g, c, x)];
  });
}, Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  parse: gt,
  hex2rgb: gr,
  rgb2hex: yr,
  colorMode: ie,
  isLight: vr,
  isDark: br,
  lighten: mr,
  darken: wr,
  splitGradientColor: Sr
}, Symbol.toStringTag, { value: "Module" })), Er = (n, e = "yyyy-MM-dd hh:mm:ss") => {
  const t = n instanceof Date ? n : new Date(n), r = {
    "y+": t.getFullYear(),
    "M+": t.getMonth() + 1,
    "d+": t.getDate(),
    "h+": t.getHours(),
    "m+": t.getMinutes(),
    "s+": t.getSeconds(),
    "q+": Math.floor((t.getMonth() + 3) / 3),
    "S+": t.getMilliseconds()
  };
  let i = e;
  return Object.keys(r).forEach((s) => {
    i = i.replace(new RegExp(`(${s})`, "g"), (o) => {
      if (s === "y+") {
        const a = Ct(r[s], o.length);
        return a.substring(a.length - o.length);
      }
      return Ct(r[s], o.length);
    });
  }), i;
}, Ar = (n = 1, e = new Date().getFullYear()) => {
  if (!Gt(e) || !Gt(n) || e < 0 || n <= 0 || n > 12)
    return 0;
  const t = 24 * 60 * 60 * 1e3;
  let r = new Date(`${e}-${Ct(n + 1, 2)}-01 00:00:00`);
  return n === 12 && (r = new Date(`${e + 1}-01-01 00:00:00`)), new Date(r.getTime() - t).getDate();
}, Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  formate: Er,
  getMonthDays: Ar
}, Symbol.toStringTag, { value: "Module" })), Tr = (n) => {
  const e = new FormData();
  return Object.keys(n).forEach((t) => {
    const r = n[t];
    Gt(r) && (Array.isArray(r) ? r.forEach((i) => {
      Object.prototype.toString.call(i) === "[object Object]" ? e.append(`${t}[]`, JSON.stringify(i)) : e.append(`${t}[]`, i);
    }) : Object.prototype.toString.call(r) === "[object Object]" ? e.append(t, JSON.stringify(n[t])) : e.append(t, n[t]));
  }), e;
}, Br = (n) => {
  const e = {};
  return n.forEach((t, r) => {
    Reflect.set(e, r, t);
  }), e;
}, _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toFormData: Tr,
  toObject: Br
}, Symbol.toStringTag, { value: "Module" })), Pt = (n = "", e = {}) => {
  const { separator: t = "-", complete: r = !1 } = e, i = typeof t == "string" ? t : `(${t.join("|")})`, s = new RegExp(`(${i}[a-z])`, "g");
  let o = n.replace(s, (a) => a[1].toLocaleUpperCase()).replace(new RegExp(i, "g"), "");
  return r && o.length > 0 && (o = o[0].toLocaleUpperCase() + o.substring(1)), o;
}, Xt = (n = "", e = {}) => {
  const { separator: t = "_" } = e;
  let r = n;
  return n.length > 0 && (r = r[0].toLocaleLowerCase() + r.substring(1)), r.replace(/[A-Z]{1}/g, (i) => `${t}${i.toLocaleLowerCase()}`).replace(/[0-9]+/g, (i) => `${t}${i}`);
}, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toCamelCase: Pt,
  toSeparatorCase: Xt
}, Symbol.toStringTag, { value: "Module" })), Vt = (n) => n == null ? !1 : n.constructor === Object, Dr = (n, e) => {
  if (Vt(n)) {
    const t = e.split(/[.]+/g).map((i) => i.trim()).filter((i) => i.length > 0);
    let r = n;
    for (let i = 0; i < t.length; i++) {
      const s = t[i];
      if (r = Reflect.get(r, s), i === t.length - 1)
        return r;
      if (!Vt(r))
        return;
    }
  }
}, xr = (n, e = []) => {
  if (!Vt(n))
    return n;
  const t = {};
  return Array.isArray(e) ? e.forEach((r) => {
    Reflect.has(n, r) && Reflect.set(t, r, n[r]);
  }) : Reflect.set(t, e, n[e]), t;
}, Rr = (n, e = []) => {
  if (!Vt(n))
    return n;
  const t = { ...n };
  return Array.isArray(e) ? e.forEach((r) => {
    Reflect.has(t, r) && delete t[r];
  }) : delete t[e], t;
}, wt = (n) => {
  if (typeof n != "object" || n === null)
    return n;
  if (n === null)
    return null;
  if (Array.isArray(n))
    return [...n].map((t) => wt(t));
  if (n instanceof Set)
    return /* @__PURE__ */ new Set([...n]);
  if (n instanceof Map)
    return new Map([...n]);
  const e = {};
  return Object.keys(n).forEach((t) => {
    const r = Reflect.get(n, t);
    Reflect.set(e, t, wt(r));
  }), e;
}, $t = (n, e = {}) => {
  var t;
  const r = {
    ...e,
    separator: (t = e.separator) != null ? t : "_"
  };
  if (n == null)
    return n;
  if (n.constructor === Object) {
    const i = {};
    for (const s in n)
      n[s] === void 0 || n[s] === null ? Reflect.set(i, Pt(s, r), n[s]) : n[s].constructor === Object || n[s].constructor === Array ? Reflect.set(i, Pt(s, r), $t(n[s])) : Reflect.set(i, Pt(s, r), n[s]);
    return i;
  } else if (n.constructor === Array)
    return n.map((i) => i == null ? i : i.constructor === Object || i.constructor === Array ? $t(i) : i);
  return n;
}, Qt = (n, e = {}) => {
  if (n == null)
    return n;
  if (n.constructor === Object) {
    const t = {};
    for (const r in n)
      n[r] === void 0 || n[r] === null ? Reflect.set(t, Xt(r, e), n[r]) : n[r].constructor === Object || n[r].constructor === Array ? Reflect.set(t, Xt(r, e), Qt(n[r])) : Reflect.set(t, Xt(r, e), n[r]);
    return t;
  } else if (n.constructor === Array)
    return n.map((t) => t == null ? t : t.constructor === Object || t.constructor === Array ? Qt(t) : t);
  return n;
}, Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  isObject: Vt,
  getValue: Dr,
  includeProperties: xr,
  excludeProperties: Rr,
  copy: wt,
  transformToCamelCase: $t,
  transformToSeparatorCase: Qt
}, Symbol.toStringTag, { value: "Module" })), Cr = (n, e = "*") => {
  if (typeof n == "string") {
    const t = typeof e == "string" && e.length > 0 ? e[0] : "*", r = new Array(4).fill(t).join("");
    if (/^[0-9]{11}$/.test(n))
      return `${n.substring(0, 3)}${r}${n.substring(7)}`;
    if (/^[0-9]{3,4}-[0-9]{8}$/.test(n)) {
      const i = n.split("-");
      return [
        i[0],
        `${i[1].substring(0, 2)}${r}${i[1].substring(6)}`
      ].join("-");
    }
  }
  return n;
}, Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  phone: Cr
}, Symbol.toStringTag, { value: "Module" })), bt = /* @__PURE__ */ new Map(), Vr = (n) => {
  const e = De();
  return bt.set(e, n), e;
}, Fr = (n = "", e = void 0) => {
  bt.has(n) && bt.set(n, e);
}, Zr = (n = "") => {
  if (bt.has(n))
    return bt.get(n);
}, Or = (n = "") => {
  bt.has(n) && bt.delete(n);
}, Ir = () => {
  bt.clear();
}, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  add: Vr,
  update: Fr,
  get: Zr,
  remove: Or,
  clear: Ir
}, Symbol.toStringTag, { value: "Module" })), Xe = (n, e) => {
  const t = [];
  return n.forEach((r) => {
    t.push(r), Array.isArray(r[e]) && t.push(...Xe(r[e], e));
  }), t;
}, _r = (n = [], e = "parentId", t = "id", r = [], i = []) => {
  if (!Array.isArray(n))
    return [];
  const s = Array.isArray(r) ? r : [r], o = n.map((T) => {
    const C = wt(T);
    return s.forEach((Z) => {
      C[`__${Z}`] = [T[Z]];
    }), C;
  }), a = o.filter((T) => T[e] === "undefined" || T[e] === "null" || T[e] === void 0 || T[e] === null ? !0 : i.includes(T[e])), f = (T, C) => {
    T.forEach((Z) => {
      C.forEach((W) => {
        W[e] === Z[t] && (f([W], C), Array.isArray(Z.children) ? Z.children.push(wt(W)) : Z.children = [wt(W)], s.forEach((N) => {
          Array.isArray(W[`${N}Index`]) && W[`__${N}`].unshift(Z[N]);
        }));
      });
    });
  };
  return f(a, o), a;
}, He = (n, e = "children") => {
  if (Array.isArray(n) && n.length > 0) {
    const t = n[0];
    return Array.isArray(t[e]) && t[e].length > 0 ? He(t[e]) : t;
  }
}, Wr = (n, e, t = !0, r) => Array.isArray(n) ? t === !0 ? n.filter((i) => i[e] === "undefined" || i[e] === null || parseInt(i[e].toString(), 10) < 0 || i[e] === r || parseInt(String(i[e]), 10) === parseInt(String(r), 10)) : n.filter((i) => i[e] === r || parseInt(String(i[e]), 10) === parseInt(String(r), 10)) : [], Ge = (n, e, t = {}) => {
  if (Array.isArray(n)) {
    const { childrenKey: r = "children", idKey: i, lastSequence: s = [], lastIndex: o = [] } = t;
    return n.map((a, f) => {
      const T = i == null || i === "" ? f : a[i], C = [...s, T], Z = [...o, f], W = Ge(
        Array.isArray(a[r]) ? a[r] : [],
        e,
        { childrenKey: r, idKey: i, lastSequence: C, lastIndex: Z }
      );
      return {
        ...a,
        ...e({
          data: a,
          index: f,
          sequence: C,
          indexSequence: Z,
          isLeaf: W.length === 0
        }),
        children: W
      };
    });
  }
  return [];
}, Ke = (n, e = {}) => {
  if (Array.isArray(n)) {
    const { childrenKey: t = "children", idKey: r, lastSequence: i = [], lastIndex: s = [] } = e;
    return n.map((o, a) => {
      const f = r == null || r === "" ? a : o[r], T = [...i, f], C = [...s, a], Z = Ke(
        Array.isArray(o[t]) ? o[t] : [],
        {
          childrenKey: t,
          idKey: r,
          lastSequence: T,
          lastIndex: C
        }
      );
      return {
        ...o,
        __data: o,
        __index: a,
        __sequence: T,
        __indexSequence: C,
        __isLeaf: Z.length === 0,
        __children: Z
      };
    });
  }
  return [];
}, Nr = (n, e = {}) => {
  if (Array.isArray(n)) {
    const {
      childrenKey: t = "children",
      isLeaf: r = !1,
      targetKey: i,
      targetValue: s = void 0,
      validator: o
    } = e;
    if (typeof i == "string")
      return Me(n, i, s, { childrenKey: t, isLeaf: r });
    if (typeof o == "function")
      return je(n, o, { childrenKey: t, isLeaf: r });
  }
}, Me = (n, e, t = void 0, r) => {
  const { childrenKey: i, isLeaf: s } = r;
  for (const o of n)
    if (Array.isArray(o[i]) && o[i].length > 0) {
      if (!s && Reflect.get(o, e) === t)
        return o;
      const a = Me(o[i], e, t, r);
      if (a)
        return a;
    } else if (Reflect.get(o, e) === t)
      return o;
}, je = (n, e, t) => {
  const { childrenKey: r, isLeaf: i } = t;
  for (const s of n)
    if (Array.isArray(s[r]) && s[r].length > 0) {
      if (!i && e(s))
        return s;
      const o = je(s[r], e, t);
      if (o)
        return o;
    } else if (e(s))
      return s;
}, Lr = (n, e = {}) => {
  if (Array.isArray(n)) {
    const {
      childrenKey: t = "children",
      isLeaf: r = !1,
      targetKey: i,
      targetValue: s = void 0,
      validator: o
    } = e;
    if (typeof i == "string")
      return ke(n, i, s, { childrenKey: t, isLeaf: r });
    if (typeof o == "function")
      return Je(n, o, { childrenKey: t, isLeaf: r });
  }
  return [];
}, ke = (n, e, t = void 0, r) => {
  const i = [], { childrenKey: s, isLeaf: o } = r;
  for (const a of n)
    Reflect.get(a, e) === t && (o ? (!Array.isArray(a[s]) || Array.isArray(a[s]) && a[s].length === 0) && i.push(a) : i.push(a)), Array.isArray(a[s]) && a[s].length > 0 && i.push(
      ...ke(a[s], e, t, r)
    );
  return i;
}, Je = (n, e, t) => {
  const r = [], { childrenKey: i, isLeaf: s } = t;
  for (const o of n)
    e(o) && (s ? (!Array.isArray(o[i]) || Array.isArray(o[i]) && o[i].length === 0) && r.push(o) : r.push(o)), Array.isArray(o[i]) && o[i].length > 0 && r.push(...Je(o[i], e, t));
  return r;
}, Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  flatTree: Xe,
  buildTree: _r,
  findFirstLeaf: He,
  filterTree: Wr,
  rebuildTree: Ge,
  rebuildTreeFast: Ke,
  findTreeNode: Nr,
  findTreeNodes: Lr
}, Symbol.toStringTag, { value: "Module" })), Pr = /^http(s){0,1}:\/\//, Xr = /^https:\/\//, Hr = /:[0-9]+$/, Gr = /\/.*$/, Kr = /#.+$/, Mr = /\?.+$/, jr = {
  fullPath: "/",
  hash: null,
  host: null,
  isSSL: !1,
  isDefaultPort: !0,
  path: "/",
  port: 80,
  protocol: "http:",
  query: {},
  uri: "/"
}, kr = (n) => {
  const e = wt(jr);
  let t = n;
  if (typeof t == "string") {
    Xr.test(n) && (e.protocol = "https:", e.port = 443), t = t.replace(Pr, "");
    const r = t.indexOf("?");
    r > -1 && t.substring(r + 1).split("&").forEach((a) => {
      const f = a.indexOf("=");
      f > -1 && Reflect.set(
        e.query,
        a.substring(0, f),
        decodeURIComponent(a.substring(f + 1))
      );
    }), t = t.replace(Mr, "");
    const i = t.indexOf("#");
    i > -1 && (e.hash = t.substring(i + 1) || null), t = t.replace(Kr, "");
    const s = t.indexOf("/");
    s > -1 && (e.path = t.substring(s)), t = t.replace(Gr, "");
    const o = t.lastIndexOf(":");
    if (o > -1)
      try {
        e.port = parseInt(t.substring(o + 1), 10);
      } catch {
      }
    t = t.replace(Hr, ""), e.host = t || null;
  }
  return e.isSSL = e.protocol === "https:", e.isDefaultPort = e.protocol === "http:" && e.port === 80 || e.protocol === "https:" && e.port === 443, e.fullPath = te(e, !0), e.uri = te(e), e;
}, te = (n, e = !1) => {
  let t = "";
  e === !1 && typeof n.host == "string" && n.host.length > 0 && (n.protocol === "http:" && n.port === 80 || n.protocol === "https:" && n.port === 443 ? t += `${n.protocol}//${n.host}` : t += `${n.protocol}//${n.host}:${n.port}`), n.path.length > 0 && (t.length === 0 || n.path !== "/") && (t += n.path), typeof n.hash == "string" && n.hash.length > 0 && (t += `#${n.hash}`);
  let r = "";
  for (const i in n.query)
    r.length > 0 ? r += `&${i}=${Reflect.get(n.query, i) || ""}` : r += `${i}=${Reflect.get(n.query, i) || ""}`;
  return r.length > 0 && (t += `?${r}`), t;
}, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  parse: kr,
  stringify: te
}, Symbol.toStringTag, { value: "Module" }));
({
  ...pt
});
const Ft = () => {
  let n = "Other";
  const { userAgent: e } = navigator;
  return e.includes("Chrome") ? n = "Chrome" : e.includes("Safari") ? n = "Safari" : e.includes("Firefox") && (n = "Firefox"), n;
}, Mt = () => {
  let n = "Other";
  const { userAgent: e } = navigator;
  return e.includes("AppleWebKit") ? n = "WebKit" : e.includes("Gecko") && (n = "Gecko"), n;
}, Jr = () => {
  const n = Ft();
  let e = "";
  const { userAgent: t } = navigator, r = t.match(new RegExp(`${n}/[0-9.]+`));
  return r && r.length > 0 && (e = r[r.length - 1].replace(new RegExp(`^${n}/`), "")), {
    browser: n,
    engine: Mt(),
    version: e
  };
}, Ur = () => Ft() === "Chrome", Yr = () => Ft() === "Firefox", zr = () => Ft() === "Safari", se = () => Mt() === "WebKit", qr = () => Mt() === "Gecko", $r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  whichBrowser: Ft,
  whichRenderingEngine: Mt,
  getBrowserInfo: Jr,
  isChrome: Ur,
  isFirefox: Yr,
  isSafari: zr,
  isWebkit: se,
  isGecko: qr
}, Symbol.toStringTag, { value: "Module" })), Qr = () => new Promise((n, e) => {
  !!navigator.clipboard && !!navigator.permissions ? se() ? navigator.permissions.query({ name: "clipboard-read" }).then(({ state: r }) => {
    r === "granted" || r === "prompt" ? n() : e(new Error("Permission Denied"));
  }).catch(() => n()) : n() : e(new Error("Permissions API \u4E0D\u652F\u6301"));
}), tn = () => new Promise((n, e) => {
  !!navigator.clipboard && !!navigator.permissions ? se() ? navigator.permissions.query({ name: "clipboard-write" }).then(({ state: r }) => {
    r === "granted" || r === "prompt" ? n() : e(new Error("Permission Denied"));
  }).catch(() => n()) : n() : e(new Error("Permissions API \u4E0D\u652F\u6301"));
}), en = (n) => new Promise((e, t) => {
  tn().then(() => navigator.clipboard.writeText(n)).then(() => e()).catch(() => {
    try {
      if (document.execCommand) {
        const r = document.createElement("input");
        r.style.position = "fixed", r.style.top = "0", r.style.left = "0", r.style.zIndex = "-1", r.style.opacity = "0", document.body.appendChild(r), r.value = n, r.select(), document.execCommand("copy"), r.remove();
      } else
        t(new Error("execCommand"));
    } catch (r) {
      t(r);
    }
  });
}), rn = () => new Promise((n, e) => {
  Qr().then(() => navigator.clipboard.readText()).then((t) => n(t)).catch(() => {
    try {
      if (document.execCommand) {
        const t = document.createElement("input");
        t.style.position = "fixed", t.style.top = "0", t.style.left = "0", t.style.zIndex = "-1", t.style.opacity = "0", document.body.appendChild(t), t.focus(), document.execCommand("paste");
        const r = t.value;
        t.remove(), n(r);
      } else
        e(new Error("execCommand"));
    } catch (t) {
      e(t);
    }
  });
}), nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  write: en,
  read: rn
}, Symbol.toStringTag, { value: "Module" }));
var sn = "0123456789abcdefghijklmnopqrstuvwxyz";
function ut(n) {
  return sn.charAt(n);
}
function on(n, e) {
  return n & e;
}
function Ot(n, e) {
  return n | e;
}
function ce(n, e) {
  return n ^ e;
}
function de(n, e) {
  return n & ~e;
}
function an(n) {
  if (n == 0)
    return -1;
  var e = 0;
  return (n & 65535) == 0 && (n >>= 16, e += 16), (n & 255) == 0 && (n >>= 8, e += 8), (n & 15) == 0 && (n >>= 4, e += 4), (n & 3) == 0 && (n >>= 2, e += 2), (n & 1) == 0 && ++e, e;
}
function hn(n) {
  for (var e = 0; n != 0; )
    n &= n - 1, ++e;
  return e;
}
var Tt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ze = "=";
function Kt(n) {
  var e, t, r = "";
  for (e = 0; e + 3 <= n.length; e += 3)
    t = parseInt(n.substring(e, e + 3), 16), r += Tt.charAt(t >> 6) + Tt.charAt(t & 63);
  for (e + 1 == n.length ? (t = parseInt(n.substring(e, e + 1), 16), r += Tt.charAt(t << 2)) : e + 2 == n.length && (t = parseInt(n.substring(e, e + 2), 16), r += Tt.charAt(t >> 2) + Tt.charAt((t & 3) << 4)); (r.length & 3) > 0; )
    r += ze;
  return r;
}
function pe(n) {
  var e = "", t, r = 0, i = 0;
  for (t = 0; t < n.length && n.charAt(t) != ze; ++t) {
    var s = Tt.indexOf(n.charAt(t));
    s < 0 || (r == 0 ? (e += ut(s >> 2), i = s & 3, r = 1) : r == 1 ? (e += ut(i << 2 | s >> 4), i = s & 15, r = 2) : r == 2 ? (e += ut(i), e += ut(s >> 2), i = s & 3, r = 3) : (e += ut(i << 2 | s >> 4), e += ut(s & 15), r = 0));
  }
  return r == 1 && (e += ut(i << 2)), e;
}
var Et, un = {
  decode: function(n) {
    var e;
    if (Et === void 0) {
      var t = "0123456789ABCDEF", r = ` \f
\r	\xA0\u2028\u2029`;
      for (Et = {}, e = 0; e < 16; ++e)
        Et[t.charAt(e)] = e;
      for (t = t.toLowerCase(), e = 10; e < 16; ++e)
        Et[t.charAt(e)] = e;
      for (e = 0; e < r.length; ++e)
        Et[r.charAt(e)] = -1;
    }
    var i = [], s = 0, o = 0;
    for (e = 0; e < n.length; ++e) {
      var a = n.charAt(e);
      if (a == "=")
        break;
      if (a = Et[a], a != -1) {
        if (a === void 0)
          throw new Error("Illegal character at offset " + e);
        s |= a, ++o >= 2 ? (i[i.length] = s, s = 0, o = 0) : s <<= 4;
      }
    }
    if (o)
      throw new Error("Hex encoding incomplete: 4 bits missing");
    return i;
  }
}, mt, ee = {
  decode: function(n) {
    var e;
    if (mt === void 0) {
      var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = `= \f
\r	\xA0\u2028\u2029`;
      for (mt = /* @__PURE__ */ Object.create(null), e = 0; e < 64; ++e)
        mt[t.charAt(e)] = e;
      for (mt["-"] = 62, mt._ = 63, e = 0; e < r.length; ++e)
        mt[r.charAt(e)] = -1;
    }
    var i = [], s = 0, o = 0;
    for (e = 0; e < n.length; ++e) {
      var a = n.charAt(e);
      if (a == "=")
        break;
      if (a = mt[a], a != -1) {
        if (a === void 0)
          throw new Error("Illegal character at offset " + e);
        s |= a, ++o >= 4 ? (i[i.length] = s >> 16, i[i.length] = s >> 8 & 255, i[i.length] = s & 255, s = 0, o = 0) : s <<= 6;
      }
    }
    switch (o) {
      case 1:
        throw new Error("Base64 encoding incomplete: at least 2 bits missing");
      case 2:
        i[i.length] = s >> 10;
        break;
      case 3:
        i[i.length] = s >> 16, i[i.length] = s >> 8 & 255;
        break;
    }
    return i;
  },
  re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  unarmor: function(n) {
    var e = ee.re.exec(n);
    if (e)
      if (e[1])
        n = e[1];
      else if (e[2])
        n = e[2];
      else
        throw new Error("RegExp out of sync");
    return ee.decode(n);
  }
}, At = 1e13, Rt = function() {
  function n(e) {
    this.buf = [+e || 0];
  }
  return n.prototype.mulAdd = function(e, t) {
    var r = this.buf, i = r.length, s, o;
    for (s = 0; s < i; ++s)
      o = r[s] * e + t, o < At ? t = 0 : (t = 0 | o / At, o -= t * At), r[s] = o;
    t > 0 && (r[s] = t);
  }, n.prototype.sub = function(e) {
    var t = this.buf, r = t.length, i, s;
    for (i = 0; i < r; ++i)
      s = t[i] - e, s < 0 ? (s += At, e = 1) : e = 0, t[i] = s;
    for (; t[t.length - 1] === 0; )
      t.pop();
  }, n.prototype.toString = function(e) {
    if ((e || 10) != 10)
      throw new Error("only base 10 is supported");
    for (var t = this.buf, r = t[t.length - 1].toString(), i = t.length - 2; i >= 0; --i)
      r += (At + t[i]).toString().substring(1);
    return r;
  }, n.prototype.valueOf = function() {
    for (var e = this.buf, t = 0, r = e.length - 1; r >= 0; --r)
      t = t * At + e[r];
    return t;
  }, n.prototype.simplify = function() {
    var e = this.buf;
    return e.length == 1 ? e[0] : this;
  }, n;
}(), qe = "\u2026", fn = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, ln = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
function Bt(n, e) {
  return n.length > e && (n = n.substring(0, e) + qe), n;
}
var Yt = function() {
  function n(e, t) {
    this.hexDigits = "0123456789ABCDEF", e instanceof n ? (this.enc = e.enc, this.pos = e.pos) : (this.enc = e, this.pos = t);
  }
  return n.prototype.get = function(e) {
    if (e === void 0 && (e = this.pos++), e >= this.enc.length)
      throw new Error(
        "Requesting byte offset " + e + " on a stream of length " + this.enc.length
      );
    return typeof this.enc == "string" ? this.enc.charCodeAt(e) : this.enc[e];
  }, n.prototype.hexByte = function(e) {
    return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(e & 15);
  }, n.prototype.hexDump = function(e, t, r) {
    for (var i = "", s = e; s < t; ++s)
      if (i += this.hexByte(this.get(s)), r !== !0)
        switch (s & 15) {
          case 7:
            i += "  ";
            break;
          case 15:
            i += `
`;
            break;
          default:
            i += " ";
        }
    return i;
  }, n.prototype.isASCII = function(e, t) {
    for (var r = e; r < t; ++r) {
      var i = this.get(r);
      if (i < 32 || i > 176)
        return !1;
    }
    return !0;
  }, n.prototype.parseStringISO = function(e, t) {
    for (var r = "", i = e; i < t; ++i)
      r += String.fromCharCode(this.get(i));
    return r;
  }, n.prototype.parseStringUTF = function(e, t) {
    for (var r = "", i = e; i < t; ) {
      var s = this.get(i++);
      s < 128 ? r += String.fromCharCode(s) : s > 191 && s < 224 ? r += String.fromCharCode((s & 31) << 6 | this.get(i++) & 63) : r += String.fromCharCode(
        (s & 15) << 12 | (this.get(i++) & 63) << 6 | this.get(i++) & 63
      );
    }
    return r;
  }, n.prototype.parseStringBMP = function(e, t) {
    for (var r = "", i, s, o = e; o < t; )
      i = this.get(o++), s = this.get(o++), r += String.fromCharCode(i << 8 | s);
    return r;
  }, n.prototype.parseTime = function(e, t, r) {
    var i = this.parseStringISO(e, t), s = (r ? fn : ln).exec(i);
    return s ? (r && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), i = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (i += ":" + s[5], s[6] && (i += ":" + s[6], s[7] && (i += "." + s[7]))), s[8] && (i += " UTC", s[8] != "Z" && (i += s[8], s[9] && (i += ":" + s[9]))), i) : "Unrecognized time: " + i;
  }, n.prototype.parseInteger = function(e, t) {
    for (var r = this.get(e), i = r > 127, s = i ? 255 : 0, o, a = ""; r == s && ++e < t; )
      r = this.get(e);
    if (o = t - e, o === 0)
      return i ? -1 : 0;
    if (o > 4) {
      for (a = r, o <<= 3; ((+a ^ s) & 128) == 0; )
        a = +a << 1, --o;
      a = "(" + o + ` bit)
`;
    }
    i && (r = r - 256);
    for (var f = new Rt(r), T = e + 1; T < t; ++T)
      f.mulAdd(256, this.get(T));
    return a + f.toString();
  }, n.prototype.parseBitString = function(e, t, r) {
    for (var i = this.get(e), s = (t - e - 1 << 3) - i, o = "(" + s + ` bit)
`, a = "", f = e + 1; f < t; ++f) {
      for (var T = this.get(f), C = f == t - 1 ? i : 0, Z = 7; Z >= C; --Z)
        a += T >> Z & 1 ? "1" : "0";
      if (a.length > r)
        return o + Bt(a, r);
    }
    return o + a;
  }, n.prototype.parseOctetString = function(e, t, r) {
    if (this.isASCII(e, t))
      return Bt(this.parseStringISO(e, t), r);
    var i = t - e, s = "(" + i + ` byte)
`;
    r /= 2, i > r && (t = e + r);
    for (var o = e; o < t; ++o)
      s += this.hexByte(this.get(o));
    return i > r && (s += qe), s;
  }, n.prototype.parseOID = function(e, t, r) {
    for (var i = "", s = new Rt(), o = 0, a = e; a < t; ++a) {
      var f = this.get(a);
      if (s.mulAdd(128, f & 127), o += 7, !(f & 128)) {
        if (i === "")
          if (s = s.simplify(), s instanceof Rt)
            s.sub(80), i = "2." + s.toString();
          else {
            var T = s < 80 ? s < 40 ? 0 : 1 : 2;
            i = T + "." + (s - T * 40);
          }
        else
          i += "." + s.toString();
        if (i.length > r)
          return Bt(i, r);
        s = new Rt(), o = 0;
      }
    }
    return o > 0 && (i += ".incomplete"), i;
  }, n;
}(), cn = function() {
  function n(e, t, r, i, s) {
    if (!(i instanceof ge))
      throw new Error("Invalid tag value.");
    this.stream = e, this.header = t, this.length = r, this.tag = i, this.sub = s;
  }
  return n.prototype.typeName = function() {
    switch (this.tag.tagClass) {
      case 0:
        switch (this.tag.tagNumber) {
          case 0:
            return "EOC";
          case 1:
            return "BOOLEAN";
          case 2:
            return "INTEGER";
          case 3:
            return "BIT_STRING";
          case 4:
            return "OCTET_STRING";
          case 5:
            return "NULL";
          case 6:
            return "OBJECT_IDENTIFIER";
          case 7:
            return "ObjectDescriptor";
          case 8:
            return "EXTERNAL";
          case 9:
            return "REAL";
          case 10:
            return "ENUMERATED";
          case 11:
            return "EMBEDDED_PDV";
          case 12:
            return "UTF8String";
          case 16:
            return "SEQUENCE";
          case 17:
            return "SET";
          case 18:
            return "NumericString";
          case 19:
            return "PrintableString";
          case 20:
            return "TeletexString";
          case 21:
            return "VideotexString";
          case 22:
            return "IA5String";
          case 23:
            return "UTCTime";
          case 24:
            return "GeneralizedTime";
          case 25:
            return "GraphicString";
          case 26:
            return "VisibleString";
          case 27:
            return "GeneralString";
          case 28:
            return "UniversalString";
          case 30:
            return "BMPString";
        }
        return "Universal_" + this.tag.tagNumber.toString();
      case 1:
        return "Application_" + this.tag.tagNumber.toString();
      case 2:
        return "[" + this.tag.tagNumber.toString() + "]";
      case 3:
        return "Private_" + this.tag.tagNumber.toString();
    }
  }, n.prototype.content = function(e) {
    if (this.tag === void 0)
      return null;
    e === void 0 && (e = 1 / 0);
    var t = this.posContent(), r = Math.abs(this.length);
    if (!this.tag.isUniversal())
      return this.sub !== null ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + r, e);
    switch (this.tag.tagNumber) {
      case 1:
        return this.stream.get(t) === 0 ? "false" : "true";
      case 2:
        return this.stream.parseInteger(t, t + r);
      case 3:
        return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(t, t + r, e);
      case 4:
        return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + r, e);
      case 6:
        return this.stream.parseOID(t, t + r, e);
      case 16:
      case 17:
        return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
      case 12:
        return Bt(this.stream.parseStringUTF(t, t + r), e);
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 26:
        return Bt(this.stream.parseStringISO(t, t + r), e);
      case 30:
        return Bt(this.stream.parseStringBMP(t, t + r), e);
      case 23:
      case 24:
        return this.stream.parseTime(t, t + r, this.tag.tagNumber == 23);
    }
    return null;
  }, n.prototype.toString = function() {
    return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
  }, n.prototype.toPrettyString = function(e) {
    e === void 0 && (e = "");
    var t = e + this.typeName() + " @" + this.stream.pos;
    if (this.length >= 0 && (t += "+"), t += this.length, this.tag.tagConstructed ? t += " (constructed)" : this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null && (t += " (encapsulates)"), t += `
`, this.sub !== null) {
      e += "  ";
      for (var r = 0, i = this.sub.length; r < i; ++r)
        t += this.sub[r].toPrettyString(e);
    }
    return t;
  }, n.prototype.posStart = function() {
    return this.stream.pos;
  }, n.prototype.posContent = function() {
    return this.stream.pos + this.header;
  }, n.prototype.posEnd = function() {
    return this.stream.pos + this.header + Math.abs(this.length);
  }, n.prototype.toHexString = function() {
    return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
  }, n.decodeLength = function(e) {
    var t = e.get(), r = t & 127;
    if (r == t)
      return r;
    if (r > 6)
      throw new Error("Length over 48 bits not supported at position " + (e.pos - 1));
    if (r === 0)
      return null;
    t = 0;
    for (var i = 0; i < r; ++i)
      t = t * 256 + e.get();
    return t;
  }, n.prototype.getHexStringValue = function() {
    var e = this.toHexString(), t = this.header * 2, r = this.length * 2;
    return e.substr(t, r);
  }, n.decode = function(e) {
    var t;
    e instanceof Yt ? t = e : t = new Yt(e, 0);
    var r = new Yt(t), i = new ge(t), s = n.decodeLength(t), o = t.pos, a = o - r.pos, f = null, T = function() {
      var Z = [];
      if (s !== null) {
        for (var W = o + s; t.pos < W; )
          Z[Z.length] = n.decode(t);
        if (t.pos != W)
          throw new Error("Content size is not correct for container starting at offset " + o);
      } else
        try {
          for (; ; ) {
            var N = n.decode(t);
            if (N.tag.isEOC())
              break;
            Z[Z.length] = N;
          }
          s = o - t.pos;
        } catch (g) {
          throw new Error("Exception while decoding undefined length content: " + g);
        }
      return Z;
    };
    if (i.tagConstructed)
      f = T();
    else if (i.isUniversal() && (i.tagNumber == 3 || i.tagNumber == 4))
      try {
        if (i.tagNumber == 3 && t.get() != 0)
          throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
        f = T();
        for (var C = 0; C < f.length; ++C)
          if (f[C].tag.isEOC())
            throw new Error("EOC is not supposed to be actual content.");
      } catch {
        f = null;
      }
    if (f === null) {
      if (s === null)
        throw new Error(
          "We can't skip over an invalid tag with undefined length at offset " + o
        );
      t.pos = o + Math.abs(s);
    }
    return new n(r, a, s, i, f);
  }, n;
}(), ge = function() {
  function n(e) {
    var t = e.get();
    if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) !== 0, this.tagNumber = t & 31, this.tagNumber == 31) {
      var r = new Rt();
      do
        t = e.get(), r.mulAdd(128, t & 127);
      while (t & 128);
      this.tagNumber = r.simplify();
    }
  }
  return n.prototype.isUniversal = function() {
    return this.tagClass === 0;
  }, n.prototype.isEOC = function() {
    return this.tagClass === 0 && this.tagNumber === 0;
  }, n;
}(), ct, dn = 244837814094590, ye = (dn & 16777215) == 15715070, z = [
  2,
  3,
  5,
  7,
  11,
  13,
  17,
  19,
  23,
  29,
  31,
  37,
  41,
  43,
  47,
  53,
  59,
  61,
  67,
  71,
  73,
  79,
  83,
  89,
  97,
  101,
  103,
  107,
  109,
  113,
  127,
  131,
  137,
  139,
  149,
  151,
  157,
  163,
  167,
  173,
  179,
  181,
  191,
  193,
  197,
  199,
  211,
  223,
  227,
  229,
  233,
  239,
  241,
  251,
  257,
  263,
  269,
  271,
  277,
  281,
  283,
  293,
  307,
  311,
  313,
  317,
  331,
  337,
  347,
  349,
  353,
  359,
  367,
  373,
  379,
  383,
  389,
  397,
  401,
  409,
  419,
  421,
  431,
  433,
  439,
  443,
  449,
  457,
  461,
  463,
  467,
  479,
  487,
  491,
  499,
  503,
  509,
  521,
  523,
  541,
  547,
  557,
  563,
  569,
  571,
  577,
  587,
  593,
  599,
  601,
  607,
  613,
  617,
  619,
  631,
  641,
  643,
  647,
  653,
  659,
  661,
  673,
  677,
  683,
  691,
  701,
  709,
  719,
  727,
  733,
  739,
  743,
  751,
  757,
  761,
  769,
  773,
  787,
  797,
  809,
  811,
  821,
  823,
  827,
  829,
  839,
  853,
  857,
  859,
  863,
  877,
  881,
  883,
  887,
  907,
  911,
  919,
  929,
  937,
  941,
  947,
  953,
  967,
  971,
  977,
  983,
  991,
  997
], pn = (1 << 26) / z[z.length - 1], L = function() {
  function n(e, t, r) {
    e != null && (typeof e == "number" ? this.fromNumber(e, t, r) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t));
  }
  return n.prototype.toString = function(e) {
    if (this.s < 0)
      return "-" + this.negate().toString(e);
    var t;
    if (e == 16)
      t = 4;
    else if (e == 8)
      t = 3;
    else if (e == 2)
      t = 1;
    else if (e == 32)
      t = 5;
    else if (e == 4)
      t = 2;
    else
      return this.toRadix(e);
    var r = (1 << t) - 1, i, s = !1, o = "", a = this.t, f = this.DB - a * this.DB % t;
    if (a-- > 0)
      for (f < this.DB && (i = this[a] >> f) > 0 && (s = !0, o = ut(i)); a >= 0; )
        f < t ? (i = (this[a] & (1 << f) - 1) << t - f, i |= this[--a] >> (f += this.DB - t)) : (i = this[a] >> (f -= t) & r, f <= 0 && (f += this.DB, --a)), i > 0 && (s = !0), s && (o += ut(i));
    return s ? o : "0";
  }, n.prototype.negate = function() {
    var e = P();
    return n.ZERO.subTo(this, e), e;
  }, n.prototype.abs = function() {
    return this.s < 0 ? this.negate() : this;
  }, n.prototype.compareTo = function(e) {
    var t = this.s - e.s;
    if (t != 0)
      return t;
    var r = this.t;
    if (t = r - e.t, t != 0)
      return this.s < 0 ? -t : t;
    for (; --r >= 0; )
      if ((t = this[r] - e[r]) != 0)
        return t;
    return 0;
  }, n.prototype.bitLength = function() {
    return this.t <= 0 ? 0 : this.DB * (this.t - 1) + It(this[this.t - 1] ^ this.s & this.DM);
  }, n.prototype.mod = function(e) {
    var t = P();
    return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(n.ZERO) > 0 && e.subTo(t, t), t;
  }, n.prototype.modPowInt = function(e, t) {
    var r;
    return e < 256 || t.isEven() ? r = new ve(t) : r = new be(t), this.exp(e, r);
  }, n.prototype.clone = function() {
    var e = P();
    return this.copyTo(e), e;
  }, n.prototype.intValue = function() {
    if (this.s < 0) {
      if (this.t == 1)
        return this[0] - this.DV;
      if (this.t == 0)
        return -1;
    } else {
      if (this.t == 1)
        return this[0];
      if (this.t == 0)
        return 0;
    }
    return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
  }, n.prototype.byteValue = function() {
    return this.t == 0 ? this.s : this[0] << 24 >> 24;
  }, n.prototype.shortValue = function() {
    return this.t == 0 ? this.s : this[0] << 16 >> 16;
  }, n.prototype.signum = function() {
    return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
  }, n.prototype.toByteArray = function() {
    var e = this.t, t = [];
    t[0] = this.s;
    var r = this.DB - e * this.DB % 8, i, s = 0;
    if (e-- > 0)
      for (r < this.DB && (i = this[e] >> r) != (this.s & this.DM) >> r && (t[s++] = i | this.s << this.DB - r); e >= 0; )
        r < 8 ? (i = (this[e] & (1 << r) - 1) << 8 - r, i |= this[--e] >> (r += this.DB - 8)) : (i = this[e] >> (r -= 8) & 255, r <= 0 && (r += this.DB, --e)), (i & 128) != 0 && (i |= -256), s == 0 && (this.s & 128) != (i & 128) && ++s, (s > 0 || i != this.s) && (t[s++] = i);
    return t;
  }, n.prototype.equals = function(e) {
    return this.compareTo(e) == 0;
  }, n.prototype.min = function(e) {
    return this.compareTo(e) < 0 ? this : e;
  }, n.prototype.max = function(e) {
    return this.compareTo(e) > 0 ? this : e;
  }, n.prototype.and = function(e) {
    var t = P();
    return this.bitwiseTo(e, on, t), t;
  }, n.prototype.or = function(e) {
    var t = P();
    return this.bitwiseTo(e, Ot, t), t;
  }, n.prototype.xor = function(e) {
    var t = P();
    return this.bitwiseTo(e, ce, t), t;
  }, n.prototype.andNot = function(e) {
    var t = P();
    return this.bitwiseTo(e, de, t), t;
  }, n.prototype.not = function() {
    for (var e = P(), t = 0; t < this.t; ++t)
      e[t] = this.DM & ~this[t];
    return e.t = this.t, e.s = ~this.s, e;
  }, n.prototype.shiftLeft = function(e) {
    var t = P();
    return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
  }, n.prototype.shiftRight = function(e) {
    var t = P();
    return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
  }, n.prototype.getLowestSetBit = function() {
    for (var e = 0; e < this.t; ++e)
      if (this[e] != 0)
        return e * this.DB + an(this[e]);
    return this.s < 0 ? this.t * this.DB : -1;
  }, n.prototype.bitCount = function() {
    for (var e = 0, t = this.s & this.DM, r = 0; r < this.t; ++r)
      e += hn(this[r] ^ t);
    return e;
  }, n.prototype.testBit = function(e) {
    var t = Math.floor(e / this.DB);
    return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
  }, n.prototype.setBit = function(e) {
    return this.changeBit(e, Ot);
  }, n.prototype.clearBit = function(e) {
    return this.changeBit(e, de);
  }, n.prototype.flipBit = function(e) {
    return this.changeBit(e, ce);
  }, n.prototype.add = function(e) {
    var t = P();
    return this.addTo(e, t), t;
  }, n.prototype.subtract = function(e) {
    var t = P();
    return this.subTo(e, t), t;
  }, n.prototype.multiply = function(e) {
    var t = P();
    return this.multiplyTo(e, t), t;
  }, n.prototype.divide = function(e) {
    var t = P();
    return this.divRemTo(e, t, null), t;
  }, n.prototype.remainder = function(e) {
    var t = P();
    return this.divRemTo(e, null, t), t;
  }, n.prototype.divideAndRemainder = function(e) {
    var t = P(), r = P();
    return this.divRemTo(e, t, r), [t, r];
  }, n.prototype.modPow = function(e, t) {
    var r = e.bitLength(), i, s = ft(1), o;
    if (r <= 0)
      return s;
    r < 18 ? i = 1 : r < 48 ? i = 3 : r < 144 ? i = 4 : r < 768 ? i = 5 : i = 6, r < 8 ? o = new ve(t) : t.isEven() ? o = new yn(t) : o = new be(t);
    var a = [], f = 3, T = i - 1, C = (1 << i) - 1;
    if (a[1] = o.convert(this), i > 1) {
      var Z = P();
      for (o.sqrTo(a[1], Z); f <= C; )
        a[f] = P(), o.mulTo(Z, a[f - 2], a[f]), f += 2;
    }
    var W = e.t - 1, N, g = !0, c = P(), x;
    for (r = It(e[W]) - 1; W >= 0; ) {
      for (r >= T ? N = e[W] >> r - T & C : (N = (e[W] & (1 << r + 1) - 1) << T - r, W > 0 && (N |= e[W - 1] >> this.DB + r - T)), f = i; (N & 1) == 0; )
        N >>= 1, --f;
      if ((r -= f) < 0 && (r += this.DB, --W), g)
        a[N].copyTo(s), g = !1;
      else {
        for (; f > 1; )
          o.sqrTo(s, c), o.sqrTo(c, s), f -= 2;
        f > 0 ? o.sqrTo(s, c) : (x = s, s = c, c = x), o.mulTo(c, a[N], s);
      }
      for (; W >= 0 && (e[W] & 1 << r) == 0; )
        o.sqrTo(s, c), x = s, s = c, c = x, --r < 0 && (r = this.DB - 1, --W);
    }
    return o.revert(s);
  }, n.prototype.modInverse = function(e) {
    var t = e.isEven();
    if (this.isEven() && t || e.signum() == 0)
      return n.ZERO;
    for (var r = e.clone(), i = this.clone(), s = ft(1), o = ft(0), a = ft(0), f = ft(1); r.signum() != 0; ) {
      for (; r.isEven(); )
        r.rShiftTo(1, r), t ? ((!s.isEven() || !o.isEven()) && (s.addTo(this, s), o.subTo(e, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(e, o), o.rShiftTo(1, o);
      for (; i.isEven(); )
        i.rShiftTo(1, i), t ? ((!a.isEven() || !f.isEven()) && (a.addTo(this, a), f.subTo(e, f)), a.rShiftTo(1, a)) : f.isEven() || f.subTo(e, f), f.rShiftTo(1, f);
      r.compareTo(i) >= 0 ? (r.subTo(i, r), t && s.subTo(a, s), o.subTo(f, o)) : (i.subTo(r, i), t && a.subTo(s, a), f.subTo(o, f));
    }
    if (i.compareTo(n.ONE) != 0)
      return n.ZERO;
    if (f.compareTo(e) >= 0)
      return f.subtract(e);
    if (f.signum() < 0)
      f.addTo(e, f);
    else
      return f;
    return f.signum() < 0 ? f.add(e) : f;
  }, n.prototype.pow = function(e) {
    return this.exp(e, new gn());
  }, n.prototype.gcd = function(e) {
    var t = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
    if (t.compareTo(r) < 0) {
      var i = t;
      t = r, r = i;
    }
    var s = t.getLowestSetBit(), o = r.getLowestSetBit();
    if (o < 0)
      return t;
    for (s < o && (o = s), o > 0 && (t.rShiftTo(o, t), r.rShiftTo(o, r)); t.signum() > 0; )
      (s = t.getLowestSetBit()) > 0 && t.rShiftTo(s, t), (s = r.getLowestSetBit()) > 0 && r.rShiftTo(s, r), t.compareTo(r) >= 0 ? (t.subTo(r, t), t.rShiftTo(1, t)) : (r.subTo(t, r), r.rShiftTo(1, r));
    return o > 0 && r.lShiftTo(o, r), r;
  }, n.prototype.isProbablePrime = function(e) {
    var t, r = this.abs();
    if (r.t == 1 && r[0] <= z[z.length - 1]) {
      for (t = 0; t < z.length; ++t)
        if (r[0] == z[t])
          return !0;
      return !1;
    }
    if (r.isEven())
      return !1;
    for (t = 1; t < z.length; ) {
      for (var i = z[t], s = t + 1; s < z.length && i < pn; )
        i *= z[s++];
      for (i = r.modInt(i); t < s; )
        if (i % z[t++] == 0)
          return !1;
    }
    return r.millerRabin(e);
  }, n.prototype.copyTo = function(e) {
    for (var t = this.t - 1; t >= 0; --t)
      e[t] = this[t];
    e.t = this.t, e.s = this.s;
  }, n.prototype.fromInt = function(e) {
    this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0;
  }, n.prototype.fromString = function(e, t) {
    var r;
    if (t == 16)
      r = 4;
    else if (t == 8)
      r = 3;
    else if (t == 256)
      r = 8;
    else if (t == 2)
      r = 1;
    else if (t == 32)
      r = 5;
    else if (t == 4)
      r = 2;
    else {
      this.fromRadix(e, t);
      return;
    }
    this.t = 0, this.s = 0;
    for (var i = e.length, s = !1, o = 0; --i >= 0; ) {
      var a = r == 8 ? +e[i] & 255 : we(e, i);
      if (a < 0) {
        e.charAt(i) == "-" && (s = !0);
        continue;
      }
      s = !1, o == 0 ? this[this.t++] = a : o + r > this.DB ? (this[this.t - 1] |= (a & (1 << this.DB - o) - 1) << o, this[this.t++] = a >> this.DB - o) : this[this.t - 1] |= a << o, o += r, o >= this.DB && (o -= this.DB);
    }
    r == 8 && (+e[0] & 128) != 0 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), s && n.ZERO.subTo(this, this);
  }, n.prototype.clamp = function() {
    for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e; )
      --this.t;
  }, n.prototype.dlShiftTo = function(e, t) {
    var r;
    for (r = this.t - 1; r >= 0; --r)
      t[r + e] = this[r];
    for (r = e - 1; r >= 0; --r)
      t[r] = 0;
    t.t = this.t + e, t.s = this.s;
  }, n.prototype.drShiftTo = function(e, t) {
    for (var r = e; r < this.t; ++r)
      t[r - e] = this[r];
    t.t = Math.max(this.t - e, 0), t.s = this.s;
  }, n.prototype.lShiftTo = function(e, t) {
    for (var r = e % this.DB, i = this.DB - r, s = (1 << i) - 1, o = Math.floor(e / this.DB), a = this.s << r & this.DM, f = this.t - 1; f >= 0; --f)
      t[f + o + 1] = this[f] >> i | a, a = (this[f] & s) << r;
    for (var f = o - 1; f >= 0; --f)
      t[f] = 0;
    t[o] = a, t.t = this.t + o + 1, t.s = this.s, t.clamp();
  }, n.prototype.rShiftTo = function(e, t) {
    t.s = this.s;
    var r = Math.floor(e / this.DB);
    if (r >= this.t) {
      t.t = 0;
      return;
    }
    var i = e % this.DB, s = this.DB - i, o = (1 << i) - 1;
    t[0] = this[r] >> i;
    for (var a = r + 1; a < this.t; ++a)
      t[a - r - 1] |= (this[a] & o) << s, t[a - r] = this[a] >> i;
    i > 0 && (t[this.t - r - 1] |= (this.s & o) << s), t.t = this.t - r, t.clamp();
  }, n.prototype.subTo = function(e, t) {
    for (var r = 0, i = 0, s = Math.min(e.t, this.t); r < s; )
      i += this[r] - e[r], t[r++] = i & this.DM, i >>= this.DB;
    if (e.t < this.t) {
      for (i -= e.s; r < this.t; )
        i += this[r], t[r++] = i & this.DM, i >>= this.DB;
      i += this.s;
    } else {
      for (i += this.s; r < e.t; )
        i -= e[r], t[r++] = i & this.DM, i >>= this.DB;
      i -= e.s;
    }
    t.s = i < 0 ? -1 : 0, i < -1 ? t[r++] = this.DV + i : i > 0 && (t[r++] = i), t.t = r, t.clamp();
  }, n.prototype.multiplyTo = function(e, t) {
    var r = this.abs(), i = e.abs(), s = r.t;
    for (t.t = s + i.t; --s >= 0; )
      t[s] = 0;
    for (s = 0; s < i.t; ++s)
      t[s + r.t] = r.am(0, i[s], t, s, 0, r.t);
    t.s = 0, t.clamp(), this.s != e.s && n.ZERO.subTo(t, t);
  }, n.prototype.squareTo = function(e) {
    for (var t = this.abs(), r = e.t = 2 * t.t; --r >= 0; )
      e[r] = 0;
    for (r = 0; r < t.t - 1; ++r) {
      var i = t.am(r, t[r], e, 2 * r, 0, 1);
      (e[r + t.t] += t.am(r + 1, 2 * t[r], e, 2 * r + 1, i, t.t - r - 1)) >= t.DV && (e[r + t.t] -= t.DV, e[r + t.t + 1] = 1);
    }
    e.t > 0 && (e[e.t - 1] += t.am(r, t[r], e, 2 * r, 0, 1)), e.s = 0, e.clamp();
  }, n.prototype.divRemTo = function(e, t, r) {
    var i = e.abs();
    if (!(i.t <= 0)) {
      var s = this.abs();
      if (s.t < i.t) {
        t != null && t.fromInt(0), r != null && this.copyTo(r);
        return;
      }
      r == null && (r = P());
      var o = P(), a = this.s, f = e.s, T = this.DB - It(i[i.t - 1]);
      T > 0 ? (i.lShiftTo(T, o), s.lShiftTo(T, r)) : (i.copyTo(o), s.copyTo(r));
      var C = o.t, Z = o[C - 1];
      if (Z != 0) {
        var W = Z * (1 << this.F1) + (C > 1 ? o[C - 2] >> this.F2 : 0), N = this.FV / W, g = (1 << this.F1) / W, c = 1 << this.F2, x = r.t, E = x - C, A = t == null ? P() : t;
        for (o.dlShiftTo(E, A), r.compareTo(A) >= 0 && (r[r.t++] = 1, r.subTo(A, r)), n.ONE.dlShiftTo(C, A), A.subTo(o, o); o.t < C; )
          o[o.t++] = 0;
        for (; --E >= 0; ) {
          var F = r[--x] == Z ? this.DM : Math.floor(r[x] * N + (r[x - 1] + c) * g);
          if ((r[x] += o.am(0, F, r, E, 0, C)) < F)
            for (o.dlShiftTo(E, A), r.subTo(A, r); r[x] < --F; )
              r.subTo(A, r);
        }
        t != null && (r.drShiftTo(C, t), a != f && n.ZERO.subTo(t, t)), r.t = C, r.clamp(), T > 0 && r.rShiftTo(T, r), a < 0 && n.ZERO.subTo(r, r);
      }
    }
  }, n.prototype.invDigit = function() {
    if (this.t < 1)
      return 0;
    var e = this[0];
    if ((e & 1) == 0)
      return 0;
    var t = e & 3;
    return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
  }, n.prototype.isEven = function() {
    return (this.t > 0 ? this[0] & 1 : this.s) == 0;
  }, n.prototype.exp = function(e, t) {
    if (e > 4294967295 || e < 1)
      return n.ONE;
    var r = P(), i = P(), s = t.convert(this), o = It(e) - 1;
    for (s.copyTo(r); --o >= 0; )
      if (t.sqrTo(r, i), (e & 1 << o) > 0)
        t.mulTo(i, s, r);
      else {
        var a = r;
        r = i, i = a;
      }
    return t.revert(r);
  }, n.prototype.chunkSize = function(e) {
    return Math.floor(Math.LN2 * this.DB / Math.log(e));
  }, n.prototype.toRadix = function(e) {
    if (e == null && (e = 10), this.signum() == 0 || e < 2 || e > 36)
      return "0";
    var t = this.chunkSize(e), r = Math.pow(e, t), i = ft(r), s = P(), o = P(), a = "";
    for (this.divRemTo(i, s, o); s.signum() > 0; )
      a = (r + o.intValue()).toString(e).substr(1) + a, s.divRemTo(i, s, o);
    return o.intValue().toString(e) + a;
  }, n.prototype.fromRadix = function(e, t) {
    this.fromInt(0), t == null && (t = 10);
    for (var r = this.chunkSize(t), i = Math.pow(t, r), s = !1, o = 0, a = 0, f = 0; f < e.length; ++f) {
      var T = we(e, f);
      if (T < 0) {
        e.charAt(f) == "-" && this.signum() == 0 && (s = !0);
        continue;
      }
      a = t * a + T, ++o >= r && (this.dMultiply(i), this.dAddOffset(a, 0), o = 0, a = 0);
    }
    o > 0 && (this.dMultiply(Math.pow(t, o)), this.dAddOffset(a, 0)), s && n.ZERO.subTo(this, this);
  }, n.prototype.fromNumber = function(e, t, r) {
    if (typeof t == "number")
      if (e < 2)
        this.fromInt(1);
      else
        for (this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(n.ONE.shiftLeft(e - 1), Ot, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t); )
          this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(n.ONE.shiftLeft(e - 1), this);
    else {
      var i = [], s = e & 7;
      i.length = (e >> 3) + 1, t.nextBytes(i), s > 0 ? i[0] &= (1 << s) - 1 : i[0] = 0, this.fromString(i, 256);
    }
  }, n.prototype.bitwiseTo = function(e, t, r) {
    var i, s, o = Math.min(e.t, this.t);
    for (i = 0; i < o; ++i)
      r[i] = t(this[i], e[i]);
    if (e.t < this.t) {
      for (s = e.s & this.DM, i = o; i < this.t; ++i)
        r[i] = t(this[i], s);
      r.t = this.t;
    } else {
      for (s = this.s & this.DM, i = o; i < e.t; ++i)
        r[i] = t(s, e[i]);
      r.t = e.t;
    }
    r.s = t(this.s, e.s), r.clamp();
  }, n.prototype.changeBit = function(e, t) {
    var r = n.ONE.shiftLeft(e);
    return this.bitwiseTo(r, t, r), r;
  }, n.prototype.addTo = function(e, t) {
    for (var r = 0, i = 0, s = Math.min(e.t, this.t); r < s; )
      i += this[r] + e[r], t[r++] = i & this.DM, i >>= this.DB;
    if (e.t < this.t) {
      for (i += e.s; r < this.t; )
        i += this[r], t[r++] = i & this.DM, i >>= this.DB;
      i += this.s;
    } else {
      for (i += this.s; r < e.t; )
        i += e[r], t[r++] = i & this.DM, i >>= this.DB;
      i += e.s;
    }
    t.s = i < 0 ? -1 : 0, i > 0 ? t[r++] = i : i < -1 && (t[r++] = this.DV + i), t.t = r, t.clamp();
  }, n.prototype.dMultiply = function(e) {
    this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
  }, n.prototype.dAddOffset = function(e, t) {
    if (e != 0) {
      for (; this.t <= t; )
        this[this.t++] = 0;
      for (this[t] += e; this[t] >= this.DV; )
        this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
    }
  }, n.prototype.multiplyLowerTo = function(e, t, r) {
    var i = Math.min(this.t + e.t, t);
    for (r.s = 0, r.t = i; i > 0; )
      r[--i] = 0;
    for (var s = r.t - this.t; i < s; ++i)
      r[i + this.t] = this.am(0, e[i], r, i, 0, this.t);
    for (var s = Math.min(e.t, t); i < s; ++i)
      this.am(0, e[i], r, i, 0, t - i);
    r.clamp();
  }, n.prototype.multiplyUpperTo = function(e, t, r) {
    --t;
    var i = r.t = this.t + e.t - t;
    for (r.s = 0; --i >= 0; )
      r[i] = 0;
    for (i = Math.max(t - this.t, 0); i < e.t; ++i)
      r[this.t + i - t] = this.am(t - i, e[i], r, 0, 0, this.t + i - t);
    r.clamp(), r.drShiftTo(1, r);
  }, n.prototype.modInt = function(e) {
    if (e <= 0)
      return 0;
    var t = this.DV % e, r = this.s < 0 ? e - 1 : 0;
    if (this.t > 0)
      if (t == 0)
        r = this[0] % e;
      else
        for (var i = this.t - 1; i >= 0; --i)
          r = (t * r + this[i]) % e;
    return r;
  }, n.prototype.millerRabin = function(e) {
    var t = this.subtract(n.ONE), r = t.getLowestSetBit();
    if (r <= 0)
      return !1;
    var i = t.shiftRight(r);
    e = e + 1 >> 1, e > z.length && (e = z.length);
    for (var s = P(), o = 0; o < e; ++o) {
      s.fromInt(z[Math.floor(Math.random() * z.length)]);
      var a = s.modPow(i, this);
      if (a.compareTo(n.ONE) != 0 && a.compareTo(t) != 0) {
        for (var f = 1; f++ < r && a.compareTo(t) != 0; )
          if (a = a.modPowInt(2, this), a.compareTo(n.ONE) == 0)
            return !1;
        if (a.compareTo(t) != 0)
          return !1;
      }
    }
    return !0;
  }, n.prototype.square = function() {
    var e = P();
    return this.squareTo(e), e;
  }, n.prototype.gcda = function(e, t) {
    var r = this.s < 0 ? this.negate() : this.clone(), i = e.s < 0 ? e.negate() : e.clone();
    if (r.compareTo(i) < 0) {
      var s = r;
      r = i, i = s;
    }
    var o = r.getLowestSetBit(), a = i.getLowestSetBit();
    if (a < 0) {
      t(r);
      return;
    }
    o < a && (a = o), a > 0 && (r.rShiftTo(a, r), i.rShiftTo(a, i));
    var f = function() {
      (o = r.getLowestSetBit()) > 0 && r.rShiftTo(o, r), (o = i.getLowestSetBit()) > 0 && i.rShiftTo(o, i), r.compareTo(i) >= 0 ? (r.subTo(i, r), r.rShiftTo(1, r)) : (i.subTo(r, i), i.rShiftTo(1, i)), r.signum() > 0 ? setTimeout(f, 0) : (a > 0 && i.lShiftTo(a, i), setTimeout(function() {
        t(i);
      }, 0));
    };
    setTimeout(f, 10);
  }, n.prototype.fromNumberAsync = function(e, t, r, i) {
    if (typeof t == "number")
      if (e < 2)
        this.fromInt(1);
      else {
        this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(n.ONE.shiftLeft(e - 1), Ot, this), this.isEven() && this.dAddOffset(1, 0);
        var s = this, o = function() {
          s.dAddOffset(2, 0), s.bitLength() > e && s.subTo(n.ONE.shiftLeft(e - 1), s), s.isProbablePrime(t) ? setTimeout(function() {
            i();
          }, 0) : setTimeout(o, 0);
        };
        setTimeout(o, 0);
      }
    else {
      var a = [], f = e & 7;
      a.length = (e >> 3) + 1, t.nextBytes(a), f > 0 ? a[0] &= (1 << f) - 1 : a[0] = 0, this.fromString(a, 256);
    }
  }, n;
}(), gn = function() {
  function n() {
  }
  return n.prototype.convert = function(e) {
    return e;
  }, n.prototype.revert = function(e) {
    return e;
  }, n.prototype.mulTo = function(e, t, r) {
    e.multiplyTo(t, r);
  }, n.prototype.sqrTo = function(e, t) {
    e.squareTo(t);
  }, n;
}(), ve = function() {
  function n(e) {
    this.m = e;
  }
  return n.prototype.convert = function(e) {
    return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
  }, n.prototype.revert = function(e) {
    return e;
  }, n.prototype.reduce = function(e) {
    e.divRemTo(this.m, null, e);
  }, n.prototype.mulTo = function(e, t, r) {
    e.multiplyTo(t, r), this.reduce(r);
  }, n.prototype.sqrTo = function(e, t) {
    e.squareTo(t), this.reduce(t);
  }, n;
}(), be = function() {
  function n(e) {
    this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
  }
  return n.prototype.convert = function(e) {
    var t = P();
    return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(L.ZERO) > 0 && this.m.subTo(t, t), t;
  }, n.prototype.revert = function(e) {
    var t = P();
    return e.copyTo(t), this.reduce(t), t;
  }, n.prototype.reduce = function(e) {
    for (; e.t <= this.mt2; )
      e[e.t++] = 0;
    for (var t = 0; t < this.m.t; ++t) {
      var r = e[t] & 32767, i = r * this.mpl + ((r * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
      for (r = t + this.m.t, e[r] += this.m.am(0, i, e, t, 0, this.m.t); e[r] >= e.DV; )
        e[r] -= e.DV, e[++r]++;
    }
    e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
  }, n.prototype.mulTo = function(e, t, r) {
    e.multiplyTo(t, r), this.reduce(r);
  }, n.prototype.sqrTo = function(e, t) {
    e.squareTo(t), this.reduce(t);
  }, n;
}(), yn = function() {
  function n(e) {
    this.m = e, this.r2 = P(), this.q3 = P(), L.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
  }
  return n.prototype.convert = function(e) {
    if (e.s < 0 || e.t > 2 * this.m.t)
      return e.mod(this.m);
    if (e.compareTo(this.m) < 0)
      return e;
    var t = P();
    return e.copyTo(t), this.reduce(t), t;
  }, n.prototype.revert = function(e) {
    return e;
  }, n.prototype.reduce = function(e) {
    for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0; )
      e.dAddOffset(1, this.m.t + 1);
    for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0; )
      e.subTo(this.m, e);
  }, n.prototype.mulTo = function(e, t, r) {
    e.multiplyTo(t, r), this.reduce(r);
  }, n.prototype.sqrTo = function(e, t) {
    e.squareTo(t), this.reduce(t);
  }, n;
}();
function P() {
  return new L(null);
}
function k(n, e) {
  return new L(n, e);
}
var me = typeof navigator < "u";
me && ye && navigator.appName == "Microsoft Internet Explorer" ? (L.prototype.am = function(e, t, r, i, s, o) {
  for (var a = t & 32767, f = t >> 15; --o >= 0; ) {
    var T = this[e] & 32767, C = this[e++] >> 15, Z = f * T + C * a;
    T = a * T + ((Z & 32767) << 15) + r[i] + (s & 1073741823), s = (T >>> 30) + (Z >>> 15) + f * C + (s >>> 30), r[i++] = T & 1073741823;
  }
  return s;
}, ct = 30) : me && ye && navigator.appName != "Netscape" ? (L.prototype.am = function(e, t, r, i, s, o) {
  for (; --o >= 0; ) {
    var a = t * this[e++] + r[i] + s;
    s = Math.floor(a / 67108864), r[i++] = a & 67108863;
  }
  return s;
}, ct = 26) : (L.prototype.am = function(e, t, r, i, s, o) {
  for (var a = t & 16383, f = t >> 14; --o >= 0; ) {
    var T = this[e] & 16383, C = this[e++] >> 14, Z = f * T + C * a;
    T = a * T + ((Z & 16383) << 14) + r[i] + s, s = (T >> 28) + (Z >> 14) + f * C, r[i++] = T & 268435455;
  }
  return s;
}, ct = 28);
L.prototype.DB = ct;
L.prototype.DM = (1 << ct) - 1;
L.prototype.DV = 1 << ct;
var oe = 52;
L.prototype.FV = Math.pow(2, oe);
L.prototype.F1 = oe - ct;
L.prototype.F2 = 2 * ct - oe;
var jt = [], Dt, it;
Dt = "0".charCodeAt(0);
for (it = 0; it <= 9; ++it)
  jt[Dt++] = it;
Dt = "a".charCodeAt(0);
for (it = 10; it < 36; ++it)
  jt[Dt++] = it;
Dt = "A".charCodeAt(0);
for (it = 10; it < 36; ++it)
  jt[Dt++] = it;
function we(n, e) {
  var t = jt[n.charCodeAt(e)];
  return t == null ? -1 : t;
}
function ft(n) {
  var e = P();
  return e.fromInt(n), e;
}
function It(n) {
  var e = 1, t;
  return (t = n >>> 16) != 0 && (n = t, e += 16), (t = n >> 8) != 0 && (n = t, e += 8), (t = n >> 4) != 0 && (n = t, e += 4), (t = n >> 2) != 0 && (n = t, e += 2), (t = n >> 1) != 0 && (n = t, e += 1), e;
}
L.ZERO = ft(0);
L.ONE = ft(1);
var vn = function() {
  function n() {
    this.i = 0, this.j = 0, this.S = [];
  }
  return n.prototype.init = function(e) {
    var t, r, i;
    for (t = 0; t < 256; ++t)
      this.S[t] = t;
    for (r = 0, t = 0; t < 256; ++t)
      r = r + this.S[t] + e[t % e.length] & 255, i = this.S[t], this.S[t] = this.S[r], this.S[r] = i;
    this.i = 0, this.j = 0;
  }, n.prototype.next = function() {
    var e;
    return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
  }, n;
}();
function bn() {
  return new vn();
}
var $e = 256, _t, lt = null, st;
if (lt == null) {
  lt = [], st = 0;
  var Wt = void 0, zt = window.crypto || window.msCrypto;
  if (zt && zt.getRandomValues) {
    var qt = new Uint32Array(256);
    for (zt.getRandomValues(qt), Wt = 0; Wt < qt.length; ++Wt)
      lt[st++] = qt[Wt] & 255;
  }
  var Nt = 0, Lt = function(n) {
    if (Nt = Nt || 0, Nt >= 256 || st >= $e) {
      window.removeEventListener ? window.removeEventListener("mousemove", Lt, !1) : window.detachEvent && window.detachEvent("onmousemove", Lt);
      return;
    }
    try {
      var e = n.x + n.y;
      lt[st++] = e & 255, Nt += 1;
    } catch {
    }
  };
  window.addEventListener ? window.addEventListener("mousemove", Lt, !1) : window.attachEvent && window.attachEvent("onmousemove", Lt);
}
function mn() {
  if (_t == null) {
    for (_t = bn(); st < $e; ) {
      var n = Math.floor(65536 * Math.random());
      lt[st++] = n & 255;
    }
    for (_t.init(lt), st = 0; st < lt.length; ++st)
      lt[st] = 0;
    st = 0;
  }
  return _t.next();
}
var re = function() {
  function n() {
  }
  return n.prototype.nextBytes = function(e) {
    for (var t = 0; t < e.length; ++t)
      e[t] = mn();
  }, n;
}();
function wn(n, e) {
  if (e < n.length + 22)
    return console.error("Message too long for RSA"), null;
  for (var t = e - n.length - 6, r = "", i = 0; i < t; i += 2)
    r += "ff";
  var s = "0001" + r + "00" + n;
  return k(s, 16);
}
function Sn(n, e) {
  if (e < n.length + 11)
    return console.error("Message too long for RSA"), null;
  for (var t = [], r = n.length - 1; r >= 0 && e > 0; ) {
    var i = n.charCodeAt(r--);
    i < 128 ? t[--e] = i : i > 127 && i < 2048 ? (t[--e] = i & 63 | 128, t[--e] = i >> 6 | 192) : (t[--e] = i & 63 | 128, t[--e] = i >> 6 & 63 | 128, t[--e] = i >> 12 | 224);
  }
  t[--e] = 0;
  for (var s = new re(), o = []; e > 2; ) {
    for (o[0] = 0; o[0] == 0; )
      s.nextBytes(o);
    t[--e] = o[0];
  }
  return t[--e] = 2, t[--e] = 0, new L(t);
}
var En = function() {
  function n() {
    this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
  }
  return n.prototype.doPublic = function(e) {
    return e.modPowInt(this.e, this.n);
  }, n.prototype.doPrivate = function(e) {
    if (this.p == null || this.q == null)
      return e.modPow(this.d, this.n);
    for (var t = e.mod(this.p).modPow(this.dmp1, this.p), r = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(r) < 0; )
      t = t.add(this.p);
    return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r);
  }, n.prototype.setPublic = function(e, t) {
    e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = k(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
  }, n.prototype.encrypt = function(e) {
    var t = this.n.bitLength() + 7 >> 3, r = Sn(e, t);
    if (r == null)
      return null;
    var i = this.doPublic(r);
    if (i == null)
      return null;
    for (var s = i.toString(16), o = s.length, a = 0; a < t * 2 - o; a++)
      s = "0" + s;
    return s;
  }, n.prototype.setPrivate = function(e, t, r) {
    e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = k(e, 16), this.e = parseInt(t, 16), this.d = k(r, 16)) : console.error("Invalid RSA private key");
  }, n.prototype.setPrivateEx = function(e, t, r, i, s, o, a, f) {
    e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = k(e, 16), this.e = parseInt(t, 16), this.d = k(r, 16), this.p = k(i, 16), this.q = k(s, 16), this.dmp1 = k(o, 16), this.dmq1 = k(a, 16), this.coeff = k(f, 16)) : console.error("Invalid RSA private key");
  }, n.prototype.generate = function(e, t) {
    var r = new re(), i = e >> 1;
    this.e = parseInt(t, 16);
    for (var s = new L(t, 16); ; ) {
      for (; this.p = new L(e - i, 1, r), !(this.p.subtract(L.ONE).gcd(s).compareTo(L.ONE) == 0 && this.p.isProbablePrime(10)); )
        ;
      for (; this.q = new L(i, 1, r), !(this.q.subtract(L.ONE).gcd(s).compareTo(L.ONE) == 0 && this.q.isProbablePrime(10)); )
        ;
      if (this.p.compareTo(this.q) <= 0) {
        var o = this.p;
        this.p = this.q, this.q = o;
      }
      var a = this.p.subtract(L.ONE), f = this.q.subtract(L.ONE), T = a.multiply(f);
      if (T.gcd(s).compareTo(L.ONE) == 0) {
        this.n = this.p.multiply(this.q), this.d = s.modInverse(T), this.dmp1 = this.d.mod(a), this.dmq1 = this.d.mod(f), this.coeff = this.q.modInverse(this.p);
        break;
      }
    }
  }, n.prototype.decrypt = function(e) {
    var t = k(e, 16), r = this.doPrivate(t);
    return r == null ? null : An(r, this.n.bitLength() + 7 >> 3);
  }, n.prototype.generateAsync = function(e, t, r) {
    var i = new re(), s = e >> 1;
    this.e = parseInt(t, 16);
    var o = new L(t, 16), a = this, f = function() {
      var T = function() {
        if (a.p.compareTo(a.q) <= 0) {
          var W = a.p;
          a.p = a.q, a.q = W;
        }
        var N = a.p.subtract(L.ONE), g = a.q.subtract(L.ONE), c = N.multiply(g);
        c.gcd(o).compareTo(L.ONE) == 0 ? (a.n = a.p.multiply(a.q), a.d = o.modInverse(c), a.dmp1 = a.d.mod(N), a.dmq1 = a.d.mod(g), a.coeff = a.q.modInverse(a.p), setTimeout(function() {
          r();
        }, 0)) : setTimeout(f, 0);
      }, C = function() {
        a.q = P(), a.q.fromNumberAsync(s, 1, i, function() {
          a.q.subtract(L.ONE).gcda(o, function(W) {
            W.compareTo(L.ONE) == 0 && a.q.isProbablePrime(10) ? setTimeout(T, 0) : setTimeout(C, 0);
          });
        });
      }, Z = function() {
        a.p = P(), a.p.fromNumberAsync(e - s, 1, i, function() {
          a.p.subtract(L.ONE).gcda(o, function(W) {
            W.compareTo(L.ONE) == 0 && a.p.isProbablePrime(10) ? setTimeout(C, 0) : setTimeout(Z, 0);
          });
        });
      };
      setTimeout(Z, 0);
    };
    setTimeout(f, 0);
  }, n.prototype.sign = function(e, t, r) {
    var i = Tn(r), s = i + t(e).toString(), o = wn(s, this.n.bitLength() / 4);
    if (o == null)
      return null;
    var a = this.doPrivate(o);
    if (a == null)
      return null;
    var f = a.toString(16);
    return (f.length & 1) == 0 ? f : "0" + f;
  }, n.prototype.verify = function(e, t, r) {
    var i = k(t, 16), s = this.doPublic(i);
    if (s == null)
      return null;
    var o = s.toString(16).replace(/^1f+00/, ""), a = Bn(o);
    return a == r(e).toString();
  }, n;
}();
function An(n, e) {
  for (var t = n.toByteArray(), r = 0; r < t.length && t[r] == 0; )
    ++r;
  if (t.length - r != e - 1 || t[r] != 2)
    return null;
  for (++r; t[r] != 0; )
    if (++r >= t.length)
      return null;
  for (var i = ""; ++r < t.length; ) {
    var s = t[r] & 255;
    s < 128 ? i += String.fromCharCode(s) : s > 191 && s < 224 ? (i += String.fromCharCode((s & 31) << 6 | t[r + 1] & 63), ++r) : (i += String.fromCharCode((s & 15) << 12 | (t[r + 1] & 63) << 6 | t[r + 2] & 63), r += 2);
  }
  return i;
}
var Ht = {
  md2: "3020300c06082a864886f70d020205000410",
  md5: "3020300c06082a864886f70d020505000410",
  sha1: "3021300906052b0e03021a05000414",
  sha224: "302d300d06096086480165030402040500041c",
  sha256: "3031300d060960864801650304020105000420",
  sha384: "3041300d060960864801650304020205000430",
  sha512: "3051300d060960864801650304020305000440",
  ripemd160: "3021300906052b2403020105000414"
};
function Tn(n) {
  return Ht[n] || "";
}
function Bn(n) {
  for (var e in Ht)
    if (Ht.hasOwnProperty(e)) {
      var t = Ht[e], r = t.length;
      if (n.substr(0, r) == t)
        return n.substr(r);
    }
  return n;
}
var J = {};
J.lang = {
  extend: function(n, e, t) {
    if (!e || !n)
      throw new Error(
        "YAHOO.lang.extend failed, please check that all dependencies are included."
      );
    var r = function() {
    };
    if (r.prototype = e.prototype, n.prototype = new r(), n.prototype.constructor = n, n.superclass = e.prototype, e.prototype.constructor == Object.prototype.constructor && (e.prototype.constructor = e), t) {
      var i;
      for (i in t)
        n.prototype[i] = t[i];
      var s = function() {
      }, o = ["toString", "valueOf"];
      try {
        /MSIE/.test(navigator.userAgent) && (s = function(a, f) {
          for (i = 0; i < o.length; i = i + 1) {
            var T = o[i], C = f[T];
            typeof C == "function" && C != Object.prototype[T] && (a[T] = C);
          }
        });
      } catch {
      }
      s(n.prototype, t);
    }
  }
};
/**
 * @fileOverview
 * @name asn1-1.0.js
 * @author Kenji Urushima kenji.urushima@gmail.com
 * @version asn1 1.0.13 (2017-Jun-02)
 * @since jsrsasign 2.1
 * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
 */
var S = {};
(typeof S.asn1 > "u" || !S.asn1) && (S.asn1 = {});
S.asn1.ASN1Util = new function() {
  this.integerToByteHex = function(n) {
    var e = n.toString(16);
    return e.length % 2 == 1 && (e = "0" + e), e;
  }, this.bigIntToMinTwosComplementsHex = function(n) {
    var e = n.toString(16);
    if (e.substr(0, 1) != "-")
      e.length % 2 == 1 ? e = "0" + e : e.match(/^[0-7]/) || (e = "00" + e);
    else {
      var t = e.substr(1), r = t.length;
      r % 2 == 1 ? r += 1 : e.match(/^[0-7]/) || (r += 2);
      for (var i = "", s = 0; s < r; s++)
        i += "f";
      var o = new L(i, 16), a = o.xor(n).add(L.ONE);
      e = a.toString(16).replace(/^-/, "");
    }
    return e;
  }, this.getPEMStringFromHex = function(n, e) {
    return hextopem(n, e);
  }, this.newObject = function(n) {
    var e = S, t = e.asn1, r = t.DERBoolean, i = t.DERInteger, s = t.DERBitString, o = t.DEROctetString, a = t.DERNull, f = t.DERObjectIdentifier, T = t.DEREnumerated, C = t.DERUTF8String, Z = t.DERNumericString, W = t.DERPrintableString, N = t.DERTeletexString, g = t.DERIA5String, c = t.DERUTCTime, x = t.DERGeneralizedTime, E = t.DERSequence, A = t.DERSet, F = t.DERTaggedObject, I = t.ASN1Util.newObject, p = Object.keys(n);
    if (p.length != 1)
      throw "key of param shall be only one.";
    var D = p[0];
    if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(
      ":" + D + ":"
    ) == -1)
      throw "undefined key: " + D;
    if (D == "bool")
      return new r(n[D]);
    if (D == "int")
      return new i(n[D]);
    if (D == "bitstr")
      return new s(n[D]);
    if (D == "octstr")
      return new o(n[D]);
    if (D == "null")
      return new a(n[D]);
    if (D == "oid")
      return new f(n[D]);
    if (D == "enum")
      return new T(n[D]);
    if (D == "utf8str")
      return new C(n[D]);
    if (D == "numstr")
      return new Z(n[D]);
    if (D == "prnstr")
      return new W(n[D]);
    if (D == "telstr")
      return new N(n[D]);
    if (D == "ia5str")
      return new g(n[D]);
    if (D == "utctime")
      return new c(n[D]);
    if (D == "gentime")
      return new x(n[D]);
    if (D == "seq") {
      for (var B = n[D], V = [], _ = 0; _ < B.length; _++) {
        var l = I(B[_]);
        V.push(l);
      }
      return new E({ array: V });
    }
    if (D == "set") {
      for (var B = n[D], V = [], _ = 0; _ < B.length; _++) {
        var l = I(B[_]);
        V.push(l);
      }
      return new A({ array: V });
    }
    if (D == "tag") {
      var O = n[D];
      if (Object.prototype.toString.call(O) === "[object Array]" && O.length == 3) {
        var u = I(O[2]);
        return new F({ tag: O[0], explicit: O[1], obj: u });
      } else {
        var h = {};
        if (O.explicit !== void 0 && (h.explicit = O.explicit), O.tag !== void 0 && (h.tag = O.tag), O.obj === void 0)
          throw "obj shall be specified for 'tag'.";
        return h.obj = I(O.obj), new F(h);
      }
    }
  }, this.jsonToASN1HEX = function(n) {
    var e = this.newObject(n);
    return e.getEncodedHex();
  };
}();
S.asn1.ASN1Util.oidHexToInt = function(n) {
  for (var i = "", e = parseInt(n.substr(0, 2), 16), t = Math.floor(e / 40), r = e % 40, i = t + "." + r, s = "", o = 2; o < n.length; o += 2) {
    var a = parseInt(n.substr(o, 2), 16), f = ("00000000" + a.toString(2)).slice(-8);
    if (s = s + f.substr(1, 7), f.substr(0, 1) == "0") {
      var T = new L(s, 2);
      i = i + "." + T.toString(10), s = "";
    }
  }
  return i;
};
S.asn1.ASN1Util.oidIntToHex = function(n) {
  var e = function(a) {
    var f = a.toString(16);
    return f.length == 1 && (f = "0" + f), f;
  }, t = function(a) {
    var f = "", T = new L(a, 10), C = T.toString(2), Z = 7 - C.length % 7;
    Z == 7 && (Z = 0);
    for (var W = "", N = 0; N < Z; N++)
      W += "0";
    C = W + C;
    for (var N = 0; N < C.length - 1; N += 7) {
      var g = C.substr(N, 7);
      N != C.length - 7 && (g = "1" + g), f += e(parseInt(g, 2));
    }
    return f;
  };
  if (!n.match(/^[0-9.]+$/))
    throw "malformed oid string: " + n;
  var r = "", i = n.split("."), s = parseInt(i[0]) * 40 + parseInt(i[1]);
  r += e(s), i.splice(0, 2);
  for (var o = 0; o < i.length; o++)
    r += t(i[o]);
  return r;
};
S.asn1.ASN1Object = function() {
  var n = "";
  this.getLengthHexFromValue = function() {
    if (typeof this.hV > "u" || this.hV == null)
      throw "this.hV is null or undefined.";
    if (this.hV.length % 2 == 1)
      throw "value hex must be even length: n=" + n.length + ",v=" + this.hV;
    var e = this.hV.length / 2, t = e.toString(16);
    if (t.length % 2 == 1 && (t = "0" + t), e < 128)
      return t;
    var r = t.length / 2;
    if (r > 15)
      throw "ASN.1 length too long to represent by 8x: n = " + e.toString(16);
    var i = 128 + r;
    return i.toString(16) + t;
  }, this.getEncodedHex = function() {
    return (this.hTLV == null || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
  }, this.getValueHex = function() {
    return this.getEncodedHex(), this.hV;
  }, this.getFreshValueHex = function() {
    return "";
  };
};
S.asn1.DERAbstractString = function(n) {
  S.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
    return this.s;
  }, this.setString = function(e) {
    this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(this.s);
  }, this.setStringHex = function(e) {
    this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, typeof n < "u" && (typeof n == "string" ? this.setString(n) : typeof n.str < "u" ? this.setString(n.str) : typeof n.hex < "u" && this.setStringHex(n.hex));
};
J.lang.extend(S.asn1.DERAbstractString, S.asn1.ASN1Object);
S.asn1.DERAbstractTime = function(n) {
  S.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
    utc = e.getTime() + e.getTimezoneOffset() * 6e4;
    var t = new Date(utc);
    return t;
  }, this.formatDate = function(e, t, r) {
    var i = this.zeroPadding, s = this.localDateToUTC(e), o = String(s.getFullYear());
    t == "utc" && (o = o.substr(2, 2));
    var a = i(String(s.getMonth() + 1), 2), f = i(String(s.getDate()), 2), T = i(String(s.getHours()), 2), C = i(String(s.getMinutes()), 2), Z = i(String(s.getSeconds()), 2), W = o + a + f + T + C + Z;
    if (r === !0) {
      var N = s.getMilliseconds();
      if (N != 0) {
        var g = i(String(N), 3);
        g = g.replace(/[0]+$/, ""), W = W + "." + g;
      }
    }
    return W + "Z";
  }, this.zeroPadding = function(e, t) {
    return e.length >= t ? e : new Array(t - e.length + 1).join("0") + e;
  }, this.getString = function() {
    return this.s;
  }, this.setString = function(e) {
    this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(e);
  }, this.setByDateValue = function(e, t, r, i, s, o) {
    var a = new Date(Date.UTC(e, t - 1, r, i, s, o, 0));
    this.setByDate(a);
  }, this.getFreshValueHex = function() {
    return this.hV;
  };
};
J.lang.extend(S.asn1.DERAbstractTime, S.asn1.ASN1Object);
S.asn1.DERAbstractStructured = function(n) {
  S.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
    this.hTLV = null, this.isModified = !0, this.asn1Array = e;
  }, this.appendASN1Object = function(e) {
    this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
  }, this.asn1Array = new Array(), typeof n < "u" && typeof n.array < "u" && (this.asn1Array = n.array);
};
J.lang.extend(S.asn1.DERAbstractStructured, S.asn1.ASN1Object);
S.asn1.DERBoolean = function() {
  S.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
};
J.lang.extend(S.asn1.DERBoolean, S.asn1.ASN1Object);
S.asn1.DERInteger = function(n) {
  S.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
    this.hTLV = null, this.isModified = !0, this.hV = S.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
  }, this.setByInteger = function(e) {
    var t = new L(String(e), 10);
    this.setByBigInteger(t);
  }, this.setValueHex = function(e) {
    this.hV = e;
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, typeof n < "u" && (typeof n.bigint < "u" ? this.setByBigInteger(n.bigint) : typeof n.int < "u" ? this.setByInteger(n.int) : typeof n == "number" ? this.setByInteger(n) : typeof n.hex < "u" && this.setValueHex(n.hex));
};
J.lang.extend(S.asn1.DERInteger, S.asn1.ASN1Object);
S.asn1.DERBitString = function(n) {
  if (n !== void 0 && typeof n.obj < "u") {
    var e = S.asn1.ASN1Util.newObject(n.obj);
    n.hex = "00" + e.getEncodedHex();
  }
  S.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(t) {
    this.hTLV = null, this.isModified = !0, this.hV = t;
  }, this.setUnusedBitsAndHexValue = function(t, r) {
    if (t < 0 || 7 < t)
      throw "unused bits shall be from 0 to 7: u = " + t;
    var i = "0" + t;
    this.hTLV = null, this.isModified = !0, this.hV = i + r;
  }, this.setByBinaryString = function(t) {
    t = t.replace(/0+$/, "");
    var r = 8 - t.length % 8;
    r == 8 && (r = 0);
    for (var i = 0; i <= r; i++)
      t += "0";
    for (var s = "", i = 0; i < t.length - 1; i += 8) {
      var o = t.substr(i, 8), a = parseInt(o, 2).toString(16);
      a.length == 1 && (a = "0" + a), s += a;
    }
    this.hTLV = null, this.isModified = !0, this.hV = "0" + r + s;
  }, this.setByBooleanArray = function(t) {
    for (var r = "", i = 0; i < t.length; i++)
      t[i] == !0 ? r += "1" : r += "0";
    this.setByBinaryString(r);
  }, this.newFalseArray = function(t) {
    for (var r = new Array(t), i = 0; i < t; i++)
      r[i] = !1;
    return r;
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, typeof n < "u" && (typeof n == "string" && n.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(n) : typeof n.hex < "u" ? this.setHexValueIncludingUnusedBits(n.hex) : typeof n.bin < "u" ? this.setByBinaryString(n.bin) : typeof n.array < "u" && this.setByBooleanArray(n.array));
};
J.lang.extend(S.asn1.DERBitString, S.asn1.ASN1Object);
S.asn1.DEROctetString = function(n) {
  if (n !== void 0 && typeof n.obj < "u") {
    var e = S.asn1.ASN1Util.newObject(n.obj);
    n.hex = e.getEncodedHex();
  }
  S.asn1.DEROctetString.superclass.constructor.call(this, n), this.hT = "04";
};
J.lang.extend(S.asn1.DEROctetString, S.asn1.DERAbstractString);
S.asn1.DERNull = function() {
  S.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
};
J.lang.extend(S.asn1.DERNull, S.asn1.ASN1Object);
S.asn1.DERObjectIdentifier = function(n) {
  var e = function(r) {
    var i = r.toString(16);
    return i.length == 1 && (i = "0" + i), i;
  }, t = function(r) {
    var i = "", s = new L(r, 10), o = s.toString(2), a = 7 - o.length % 7;
    a == 7 && (a = 0);
    for (var f = "", T = 0; T < a; T++)
      f += "0";
    o = f + o;
    for (var T = 0; T < o.length - 1; T += 7) {
      var C = o.substr(T, 7);
      T != o.length - 7 && (C = "1" + C), i += e(parseInt(C, 2));
    }
    return i;
  };
  S.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(r) {
    this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
  }, this.setValueOidString = function(r) {
    if (!r.match(/^[0-9.]+$/))
      throw "malformed oid string: " + r;
    var i = "", s = r.split("."), o = parseInt(s[0]) * 40 + parseInt(s[1]);
    i += e(o), s.splice(0, 2);
    for (var a = 0; a < s.length; a++)
      i += t(s[a]);
    this.hTLV = null, this.isModified = !0, this.s = null, this.hV = i;
  }, this.setValueName = function(r) {
    var i = S.asn1.x509.OID.name2oid(r);
    if (i !== "")
      this.setValueOidString(i);
    else
      throw "DERObjectIdentifier oidName undefined: " + r;
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, n !== void 0 && (typeof n == "string" ? n.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(n) : this.setValueName(n) : n.oid !== void 0 ? this.setValueOidString(n.oid) : n.hex !== void 0 ? this.setValueHex(n.hex) : n.name !== void 0 && this.setValueName(n.name));
};
J.lang.extend(S.asn1.DERObjectIdentifier, S.asn1.ASN1Object);
S.asn1.DEREnumerated = function(n) {
  S.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
    this.hTLV = null, this.isModified = !0, this.hV = S.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
  }, this.setByInteger = function(e) {
    var t = new L(String(e), 10);
    this.setByBigInteger(t);
  }, this.setValueHex = function(e) {
    this.hV = e;
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, typeof n < "u" && (typeof n.int < "u" ? this.setByInteger(n.int) : typeof n == "number" ? this.setByInteger(n) : typeof n.hex < "u" && this.setValueHex(n.hex));
};
J.lang.extend(S.asn1.DEREnumerated, S.asn1.ASN1Object);
S.asn1.DERUTF8String = function(n) {
  S.asn1.DERUTF8String.superclass.constructor.call(this, n), this.hT = "0c";
};
J.lang.extend(S.asn1.DERUTF8String, S.asn1.DERAbstractString);
S.asn1.DERNumericString = function(n) {
  S.asn1.DERNumericString.superclass.constructor.call(this, n), this.hT = "12";
};
J.lang.extend(S.asn1.DERNumericString, S.asn1.DERAbstractString);
S.asn1.DERPrintableString = function(n) {
  S.asn1.DERPrintableString.superclass.constructor.call(this, n), this.hT = "13";
};
J.lang.extend(S.asn1.DERPrintableString, S.asn1.DERAbstractString);
S.asn1.DERTeletexString = function(n) {
  S.asn1.DERTeletexString.superclass.constructor.call(this, n), this.hT = "14";
};
J.lang.extend(S.asn1.DERTeletexString, S.asn1.DERAbstractString);
S.asn1.DERIA5String = function(n) {
  S.asn1.DERIA5String.superclass.constructor.call(this, n), this.hT = "16";
};
J.lang.extend(S.asn1.DERIA5String, S.asn1.DERAbstractString);
S.asn1.DERUTCTime = function(n) {
  S.asn1.DERUTCTime.superclass.constructor.call(this, n), this.hT = "17", this.setByDate = function(e) {
    this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
  }, this.getFreshValueHex = function() {
    return typeof this.date > "u" && typeof this.s > "u" && (this.date = new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
  }, n !== void 0 && (n.str !== void 0 ? this.setString(n.str) : typeof n == "string" && n.match(/^[0-9]{12}Z$/) ? this.setString(n) : n.hex !== void 0 ? this.setStringHex(n.hex) : n.date !== void 0 && this.setByDate(n.date));
};
J.lang.extend(S.asn1.DERUTCTime, S.asn1.DERAbstractTime);
S.asn1.DERGeneralizedTime = function(n) {
  S.asn1.DERGeneralizedTime.superclass.constructor.call(this, n), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
    this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
  }, this.getFreshValueHex = function() {
    return this.date === void 0 && this.s === void 0 && (this.date = new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
  }, n !== void 0 && (n.str !== void 0 ? this.setString(n.str) : typeof n == "string" && n.match(/^[0-9]{14}Z$/) ? this.setString(n) : n.hex !== void 0 ? this.setStringHex(n.hex) : n.date !== void 0 && this.setByDate(n.date), n.millis === !0 && (this.withMillis = !0));
};
J.lang.extend(S.asn1.DERGeneralizedTime, S.asn1.DERAbstractTime);
S.asn1.DERSequence = function(n) {
  S.asn1.DERSequence.superclass.constructor.call(this, n), this.hT = "30", this.getFreshValueHex = function() {
    for (var e = "", t = 0; t < this.asn1Array.length; t++) {
      var r = this.asn1Array[t];
      e += r.getEncodedHex();
    }
    return this.hV = e, this.hV;
  };
};
J.lang.extend(S.asn1.DERSequence, S.asn1.DERAbstractStructured);
S.asn1.DERSet = function(n) {
  S.asn1.DERSet.superclass.constructor.call(this, n), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
    for (var e = new Array(), t = 0; t < this.asn1Array.length; t++) {
      var r = this.asn1Array[t];
      e.push(r.getEncodedHex());
    }
    return this.sortFlag == !0 && e.sort(), this.hV = e.join(""), this.hV;
  }, typeof n < "u" && typeof n.sortflag < "u" && n.sortflag == !1 && (this.sortFlag = !1);
};
J.lang.extend(S.asn1.DERSet, S.asn1.DERAbstractStructured);
S.asn1.DERTaggedObject = function(n) {
  S.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, r) {
    this.hT = t, this.isExplicit = e, this.asn1Object = r, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = r.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
  }, this.getFreshValueHex = function() {
    return this.hV;
  }, typeof n < "u" && (typeof n.tag < "u" && (this.hT = n.tag), typeof n.explicit < "u" && (this.isExplicit = n.explicit), typeof n.obj < "u" && (this.asn1Object = n.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
};
J.lang.extend(S.asn1.DERTaggedObject, S.asn1.ASN1Object);
var Dn = globalThis && globalThis.__extends || function() {
  var n = function(e, t) {
    return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) {
      r.__proto__ = i;
    } || function(r, i) {
      for (var s in i)
        Object.prototype.hasOwnProperty.call(i, s) && (r[s] = i[s]);
    }, n(e, t);
  };
  return function(e, t) {
    if (typeof t != "function" && t !== null)
      throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
    n(e, t);
    function r() {
      this.constructor = e;
    }
    e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
  };
}(), Se = function(n) {
  Dn(e, n);
  function e(t) {
    var r = n.call(this) || this;
    return t && (typeof t == "string" ? r.parseKey(t) : (e.hasPrivateKeyProperty(t) || e.hasPublicKeyProperty(t)) && r.parsePropertiesFrom(t)), r;
  }
  return e.prototype.parseKey = function(t) {
    try {
      var r = 0, i = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, o = s.test(t) ? un.decode(t) : ee.unarmor(t), a = cn.decode(o);
      if (a.sub.length === 3 && (a = a.sub[2].sub[0]), a.sub.length === 9) {
        r = a.sub[1].getHexStringValue(), this.n = k(r, 16), i = a.sub[2].getHexStringValue(), this.e = parseInt(i, 16);
        var f = a.sub[3].getHexStringValue();
        this.d = k(f, 16);
        var T = a.sub[4].getHexStringValue();
        this.p = k(T, 16);
        var C = a.sub[5].getHexStringValue();
        this.q = k(C, 16);
        var Z = a.sub[6].getHexStringValue();
        this.dmp1 = k(Z, 16);
        var W = a.sub[7].getHexStringValue();
        this.dmq1 = k(W, 16);
        var N = a.sub[8].getHexStringValue();
        this.coeff = k(N, 16);
      } else if (a.sub.length === 2) {
        var g = a.sub[1], c = g.sub[0];
        r = c.sub[0].getHexStringValue(), this.n = k(r, 16), i = c.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
      } else
        return !1;
      return !0;
    } catch {
      return !1;
    }
  }, e.prototype.getPrivateBaseKey = function() {
    var t = {
      array: [
        new S.asn1.DERInteger({ int: 0 }),
        new S.asn1.DERInteger({ bigint: this.n }),
        new S.asn1.DERInteger({ int: this.e }),
        new S.asn1.DERInteger({ bigint: this.d }),
        new S.asn1.DERInteger({ bigint: this.p }),
        new S.asn1.DERInteger({ bigint: this.q }),
        new S.asn1.DERInteger({ bigint: this.dmp1 }),
        new S.asn1.DERInteger({ bigint: this.dmq1 }),
        new S.asn1.DERInteger({ bigint: this.coeff })
      ]
    }, r = new S.asn1.DERSequence(t);
    return r.getEncodedHex();
  }, e.prototype.getPrivateBaseKeyB64 = function() {
    return Kt(this.getPrivateBaseKey());
  }, e.prototype.getPublicBaseKey = function() {
    var t = new S.asn1.DERSequence({
      array: [
        new S.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
        new S.asn1.DERNull()
      ]
    }), r = new S.asn1.DERSequence({
      array: [
        new S.asn1.DERInteger({ bigint: this.n }),
        new S.asn1.DERInteger({ int: this.e })
      ]
    }), i = new S.asn1.DERBitString({
      hex: "00" + r.getEncodedHex()
    }), s = new S.asn1.DERSequence({
      array: [t, i]
    });
    return s.getEncodedHex();
  }, e.prototype.getPublicBaseKeyB64 = function() {
    return Kt(this.getPublicBaseKey());
  }, e.wordwrap = function(t, r) {
    if (r = r || 64, !t)
      return t;
    var i = "(.{1," + r + `})( +|$
?)|(.{1,` + r + "})";
    return t.match(RegExp(i, "g")).join(`
`);
  }, e.prototype.getPrivateKey = function() {
    var t = `-----BEGIN RSA PRIVATE KEY-----
`;
    return t += e.wordwrap(this.getPrivateBaseKeyB64()) + `
`, t += "-----END RSA PRIVATE KEY-----", t;
  }, e.prototype.getPublicKey = function() {
    var t = `-----BEGIN PUBLIC KEY-----
`;
    return t += e.wordwrap(this.getPublicBaseKeyB64()) + `
`, t += "-----END PUBLIC KEY-----", t;
  }, e.hasPublicKeyProperty = function(t) {
    return t = t || {}, t.hasOwnProperty("n") && t.hasOwnProperty("e");
  }, e.hasPrivateKeyProperty = function(t) {
    return t = t || {}, t.hasOwnProperty("n") && t.hasOwnProperty("e") && t.hasOwnProperty("d") && t.hasOwnProperty("p") && t.hasOwnProperty("q") && t.hasOwnProperty("dmp1") && t.hasOwnProperty("dmq1") && t.hasOwnProperty("coeff");
  }, e.prototype.parsePropertiesFrom = function(t) {
    this.n = t.n, this.e = t.e, t.hasOwnProperty("d") && (this.d = t.d, this.p = t.p, this.q = t.q, this.dmp1 = t.dmp1, this.dmq1 = t.dmq1, this.coeff = t.coeff);
  }, e;
}(En);
const xn = "3.2.1", Rn = {
  version: xn
};
var Qe = function() {
  function n(e) {
    e === void 0 && (e = {}), e = e || {}, this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = null;
  }
  return n.prototype.setKey = function(e) {
    this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Se(e);
  }, n.prototype.setPrivateKey = function(e) {
    this.setKey(e);
  }, n.prototype.setPublicKey = function(e) {
    this.setKey(e);
  }, n.prototype.decrypt = function(e) {
    try {
      return this.getKey().decrypt(pe(e));
    } catch {
      return !1;
    }
  }, n.prototype.encrypt = function(e) {
    try {
      return Kt(this.getKey().encrypt(e));
    } catch {
      return !1;
    }
  }, n.prototype.sign = function(e, t, r) {
    try {
      return Kt(this.getKey().sign(e, t, r));
    } catch {
      return !1;
    }
  }, n.prototype.verify = function(e, t, r) {
    try {
      return this.getKey().verify(e, pe(t), r);
    } catch {
      return !1;
    }
  }, n.prototype.getKey = function(e) {
    if (!this.key) {
      if (this.key = new Se(), e && {}.toString.call(e) === "[object Function]") {
        this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
        return;
      }
      this.key.generate(this.default_key_size, this.default_public_exponent);
    }
    return this.key;
  }, n.prototype.getPrivateKey = function() {
    return this.getKey().getPrivateKey();
  }, n.prototype.getPrivateKeyB64 = function() {
    return this.getKey().getPrivateBaseKeyB64();
  }, n.prototype.getPublicKey = function() {
    return this.getKey().getPublicKey();
  }, n.prototype.getPublicKeyB64 = function() {
    return this.getKey().getPublicBaseKeyB64();
  }, n.version = Rn.version, n;
}(), Ee = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
function at(n, e) {
  var t = n[0], r = n[1], i = n[2], s = n[3];
  t += (r & i | ~r & s) + e[0] - 680876936 | 0, t = (t << 7 | t >>> 25) + r | 0, s += (t & r | ~t & i) + e[1] - 389564586 | 0, s = (s << 12 | s >>> 20) + t | 0, i += (s & t | ~s & r) + e[2] + 606105819 | 0, i = (i << 17 | i >>> 15) + s | 0, r += (i & s | ~i & t) + e[3] - 1044525330 | 0, r = (r << 22 | r >>> 10) + i | 0, t += (r & i | ~r & s) + e[4] - 176418897 | 0, t = (t << 7 | t >>> 25) + r | 0, s += (t & r | ~t & i) + e[5] + 1200080426 | 0, s = (s << 12 | s >>> 20) + t | 0, i += (s & t | ~s & r) + e[6] - 1473231341 | 0, i = (i << 17 | i >>> 15) + s | 0, r += (i & s | ~i & t) + e[7] - 45705983 | 0, r = (r << 22 | r >>> 10) + i | 0, t += (r & i | ~r & s) + e[8] + 1770035416 | 0, t = (t << 7 | t >>> 25) + r | 0, s += (t & r | ~t & i) + e[9] - 1958414417 | 0, s = (s << 12 | s >>> 20) + t | 0, i += (s & t | ~s & r) + e[10] - 42063 | 0, i = (i << 17 | i >>> 15) + s | 0, r += (i & s | ~i & t) + e[11] - 1990404162 | 0, r = (r << 22 | r >>> 10) + i | 0, t += (r & i | ~r & s) + e[12] + 1804603682 | 0, t = (t << 7 | t >>> 25) + r | 0, s += (t & r | ~t & i) + e[13] - 40341101 | 0, s = (s << 12 | s >>> 20) + t | 0, i += (s & t | ~s & r) + e[14] - 1502002290 | 0, i = (i << 17 | i >>> 15) + s | 0, r += (i & s | ~i & t) + e[15] + 1236535329 | 0, r = (r << 22 | r >>> 10) + i | 0, t += (r & s | i & ~s) + e[1] - 165796510 | 0, t = (t << 5 | t >>> 27) + r | 0, s += (t & i | r & ~i) + e[6] - 1069501632 | 0, s = (s << 9 | s >>> 23) + t | 0, i += (s & r | t & ~r) + e[11] + 643717713 | 0, i = (i << 14 | i >>> 18) + s | 0, r += (i & t | s & ~t) + e[0] - 373897302 | 0, r = (r << 20 | r >>> 12) + i | 0, t += (r & s | i & ~s) + e[5] - 701558691 | 0, t = (t << 5 | t >>> 27) + r | 0, s += (t & i | r & ~i) + e[10] + 38016083 | 0, s = (s << 9 | s >>> 23) + t | 0, i += (s & r | t & ~r) + e[15] - 660478335 | 0, i = (i << 14 | i >>> 18) + s | 0, r += (i & t | s & ~t) + e[4] - 405537848 | 0, r = (r << 20 | r >>> 12) + i | 0, t += (r & s | i & ~s) + e[9] + 568446438 | 0, t = (t << 5 | t >>> 27) + r | 0, s += (t & i | r & ~i) + e[14] - 1019803690 | 0, s = (s << 9 | s >>> 23) + t | 0, i += (s & r | t & ~r) + e[3] - 187363961 | 0, i = (i << 14 | i >>> 18) + s | 0, r += (i & t | s & ~t) + e[8] + 1163531501 | 0, r = (r << 20 | r >>> 12) + i | 0, t += (r & s | i & ~s) + e[13] - 1444681467 | 0, t = (t << 5 | t >>> 27) + r | 0, s += (t & i | r & ~i) + e[2] - 51403784 | 0, s = (s << 9 | s >>> 23) + t | 0, i += (s & r | t & ~r) + e[7] + 1735328473 | 0, i = (i << 14 | i >>> 18) + s | 0, r += (i & t | s & ~t) + e[12] - 1926607734 | 0, r = (r << 20 | r >>> 12) + i | 0, t += (r ^ i ^ s) + e[5] - 378558 | 0, t = (t << 4 | t >>> 28) + r | 0, s += (t ^ r ^ i) + e[8] - 2022574463 | 0, s = (s << 11 | s >>> 21) + t | 0, i += (s ^ t ^ r) + e[11] + 1839030562 | 0, i = (i << 16 | i >>> 16) + s | 0, r += (i ^ s ^ t) + e[14] - 35309556 | 0, r = (r << 23 | r >>> 9) + i | 0, t += (r ^ i ^ s) + e[1] - 1530992060 | 0, t = (t << 4 | t >>> 28) + r | 0, s += (t ^ r ^ i) + e[4] + 1272893353 | 0, s = (s << 11 | s >>> 21) + t | 0, i += (s ^ t ^ r) + e[7] - 155497632 | 0, i = (i << 16 | i >>> 16) + s | 0, r += (i ^ s ^ t) + e[10] - 1094730640 | 0, r = (r << 23 | r >>> 9) + i | 0, t += (r ^ i ^ s) + e[13] + 681279174 | 0, t = (t << 4 | t >>> 28) + r | 0, s += (t ^ r ^ i) + e[0] - 358537222 | 0, s = (s << 11 | s >>> 21) + t | 0, i += (s ^ t ^ r) + e[3] - 722521979 | 0, i = (i << 16 | i >>> 16) + s | 0, r += (i ^ s ^ t) + e[6] + 76029189 | 0, r = (r << 23 | r >>> 9) + i | 0, t += (r ^ i ^ s) + e[9] - 640364487 | 0, t = (t << 4 | t >>> 28) + r | 0, s += (t ^ r ^ i) + e[12] - 421815835 | 0, s = (s << 11 | s >>> 21) + t | 0, i += (s ^ t ^ r) + e[15] + 530742520 | 0, i = (i << 16 | i >>> 16) + s | 0, r += (i ^ s ^ t) + e[2] - 995338651 | 0, r = (r << 23 | r >>> 9) + i | 0, t += (i ^ (r | ~s)) + e[0] - 198630844 | 0, t = (t << 6 | t >>> 26) + r | 0, s += (r ^ (t | ~i)) + e[7] + 1126891415 | 0, s = (s << 10 | s >>> 22) + t | 0, i += (t ^ (s | ~r)) + e[14] - 1416354905 | 0, i = (i << 15 | i >>> 17) + s | 0, r += (s ^ (i | ~t)) + e[5] - 57434055 | 0, r = (r << 21 | r >>> 11) + i | 0, t += (i ^ (r | ~s)) + e[12] + 1700485571 | 0, t = (t << 6 | t >>> 26) + r | 0, s += (r ^ (t | ~i)) + e[3] - 1894986606 | 0, s = (s << 10 | s >>> 22) + t | 0, i += (t ^ (s | ~r)) + e[10] - 1051523 | 0, i = (i << 15 | i >>> 17) + s | 0, r += (s ^ (i | ~t)) + e[1] - 2054922799 | 0, r = (r << 21 | r >>> 11) + i | 0, t += (i ^ (r | ~s)) + e[8] + 1873313359 | 0, t = (t << 6 | t >>> 26) + r | 0, s += (r ^ (t | ~i)) + e[15] - 30611744 | 0, s = (s << 10 | s >>> 22) + t | 0, i += (t ^ (s | ~r)) + e[6] - 1560198380 | 0, i = (i << 15 | i >>> 17) + s | 0, r += (s ^ (i | ~t)) + e[13] + 1309151649 | 0, r = (r << 21 | r >>> 11) + i | 0, t += (i ^ (r | ~s)) + e[4] - 145523070 | 0, t = (t << 6 | t >>> 26) + r | 0, s += (r ^ (t | ~i)) + e[11] - 1120210379 | 0, s = (s << 10 | s >>> 22) + t | 0, i += (t ^ (s | ~r)) + e[2] + 718787259 | 0, i = (i << 15 | i >>> 17) + s | 0, r += (s ^ (i | ~t)) + e[9] - 343485551 | 0, r = (r << 21 | r >>> 11) + i | 0, n[0] = t + n[0] | 0, n[1] = r + n[1] | 0, n[2] = i + n[2] | 0, n[3] = s + n[3] | 0;
}
function tr(n) {
  var e = [], t;
  for (t = 0; t < 64; t += 4)
    e[t >> 2] = n.charCodeAt(t) + (n.charCodeAt(t + 1) << 8) + (n.charCodeAt(t + 2) << 16) + (n.charCodeAt(t + 3) << 24);
  return e;
}
function er(n) {
  var e = [], t;
  for (t = 0; t < 64; t += 4)
    e[t >> 2] = n[t] + (n[t + 1] << 8) + (n[t + 2] << 16) + (n[t + 3] << 24);
  return e;
}
function rr(n) {
  var e = n.length, t = [1732584193, -271733879, -1732584194, 271733878], r, i, s, o, a, f;
  for (r = 64; r <= e; r += 64)
    at(t, tr(n.substring(r - 64, r)));
  for (n = n.substring(r - 64), i = n.length, s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], r = 0; r < i; r += 1)
    s[r >> 2] |= n.charCodeAt(r) << (r % 4 << 3);
  if (s[r >> 2] |= 128 << (r % 4 << 3), r > 55)
    for (at(t, s), r = 0; r < 16; r += 1)
      s[r] = 0;
  return o = e * 8, o = o.toString(16).match(/(.*?)(.{0,8})$/), a = parseInt(o[2], 16), f = parseInt(o[1], 16) || 0, s[14] = a, s[15] = f, at(t, s), t;
}
function Cn(n) {
  var e = n.length, t = [1732584193, -271733879, -1732584194, 271733878], r, i, s, o, a, f;
  for (r = 64; r <= e; r += 64)
    at(t, er(n.subarray(r - 64, r)));
  for (n = r - 64 < e ? n.subarray(r - 64) : new Uint8Array(0), i = n.length, s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], r = 0; r < i; r += 1)
    s[r >> 2] |= n[r] << (r % 4 << 3);
  if (s[r >> 2] |= 128 << (r % 4 << 3), r > 55)
    for (at(t, s), r = 0; r < 16; r += 1)
      s[r] = 0;
  return o = e * 8, o = o.toString(16).match(/(.*?)(.{0,8})$/), a = parseInt(o[2], 16), f = parseInt(o[1], 16) || 0, s[14] = a, s[15] = f, at(t, s), t;
}
function Vn(n) {
  var e = "", t;
  for (t = 0; t < 4; t += 1)
    e += Ee[n >> t * 8 + 4 & 15] + Ee[n >> t * 8 & 15];
  return e;
}
function Zt(n) {
  var e;
  for (e = 0; e < n.length; e += 1)
    n[e] = Vn(n[e]);
  return n.join("");
}
Zt(rr("hello"));
typeof ArrayBuffer < "u" && !ArrayBuffer.prototype.slice && function() {
  function n(e, t) {
    return e = e | 0 || 0, e < 0 ? Math.max(e + t, 0) : Math.min(e, t);
  }
  ArrayBuffer.prototype.slice = function(e, t) {
    var r = this.byteLength, i = n(e, r), s = r, o, a, f, T;
    return t !== void 0 && (s = n(t, r)), i > s ? new ArrayBuffer(0) : (o = s - i, a = new ArrayBuffer(o), f = new Uint8Array(a), T = new Uint8Array(this, i, o), f.set(T), a);
  };
}();
function nr(n) {
  return /[\u0080-\uFFFF]/.test(n) && (n = unescape(encodeURIComponent(n))), n;
}
function Fn(n, e) {
  var t = n.length, r = new ArrayBuffer(t), i = new Uint8Array(r), s;
  for (s = 0; s < t; s += 1)
    i[s] = n.charCodeAt(s);
  return e ? i : r;
}
function Zn(n) {
  return String.fromCharCode.apply(null, new Uint8Array(n));
}
function On(n, e, t) {
  var r = new Uint8Array(n.byteLength + e.byteLength);
  return r.set(new Uint8Array(n)), r.set(new Uint8Array(e), n.byteLength), t ? r : r.buffer;
}
function kt(n) {
  var e = [], t = n.length, r;
  for (r = 0; r < t - 1; r += 2)
    e.push(parseInt(n.substr(r, 2), 16));
  return String.fromCharCode.apply(String, e);
}
function H() {
  this.reset();
}
H.prototype.append = function(n) {
  return this.appendBinary(nr(n)), this;
};
H.prototype.appendBinary = function(n) {
  this._buff += n, this._length += n.length;
  var e = this._buff.length, t;
  for (t = 64; t <= e; t += 64)
    at(this._hash, tr(this._buff.substring(t - 64, t)));
  return this._buff = this._buff.substring(t - 64), this;
};
H.prototype.end = function(n) {
  var e = this._buff, t = e.length, r, i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], s;
  for (r = 0; r < t; r += 1)
    i[r >> 2] |= e.charCodeAt(r) << (r % 4 << 3);
  return this._finish(i, t), s = Zt(this._hash), n && (s = kt(s)), this.reset(), s;
};
H.prototype.reset = function() {
  return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
};
H.prototype.getState = function() {
  return {
    buff: this._buff,
    length: this._length,
    hash: this._hash.slice()
  };
};
H.prototype.setState = function(n) {
  return this._buff = n.buff, this._length = n.length, this._hash = n.hash, this;
};
H.prototype.destroy = function() {
  delete this._hash, delete this._buff, delete this._length;
};
H.prototype._finish = function(n, e) {
  var t = e, r, i, s;
  if (n[t >> 2] |= 128 << (t % 4 << 3), t > 55)
    for (at(this._hash, n), t = 0; t < 16; t += 1)
      n[t] = 0;
  r = this._length * 8, r = r.toString(16).match(/(.*?)(.{0,8})$/), i = parseInt(r[2], 16), s = parseInt(r[1], 16) || 0, n[14] = i, n[15] = s, at(this._hash, n);
};
H.hash = function(n, e) {
  return H.hashBinary(nr(n), e);
};
H.hashBinary = function(n, e) {
  var t = rr(n), r = Zt(t);
  return e ? kt(r) : r;
};
H.ArrayBuffer = function() {
  this.reset();
};
H.ArrayBuffer.prototype.append = function(n) {
  var e = On(this._buff.buffer, n, !0), t = e.length, r;
  for (this._length += n.byteLength, r = 64; r <= t; r += 64)
    at(this._hash, er(e.subarray(r - 64, r)));
  return this._buff = r - 64 < t ? new Uint8Array(e.buffer.slice(r - 64)) : new Uint8Array(0), this;
};
H.ArrayBuffer.prototype.end = function(n) {
  var e = this._buff, t = e.length, r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], i, s;
  for (i = 0; i < t; i += 1)
    r[i >> 2] |= e[i] << (i % 4 << 3);
  return this._finish(r, t), s = Zt(this._hash), n && (s = kt(s)), this.reset(), s;
};
H.ArrayBuffer.prototype.reset = function() {
  return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
};
H.ArrayBuffer.prototype.getState = function() {
  var n = H.prototype.getState.call(this);
  return n.buff = Zn(n.buff), n;
};
H.ArrayBuffer.prototype.setState = function(n) {
  return n.buff = Fn(n.buff, !0), H.prototype.setState.call(this, n);
};
H.ArrayBuffer.prototype.destroy = H.prototype.destroy;
H.ArrayBuffer.prototype._finish = H.prototype._finish;
H.ArrayBuffer.hash = function(n, e) {
  var t = Cn(new Uint8Array(n)), r = Zt(t);
  return e ? kt(r) : r;
};
const In = (n, e, t = "2048") => {
  if (pt.isEmpty(n))
    throw new Error("public key must be provided");
  if (pt.isEmpty(e))
    throw new Error("raw must be provided");
  if (window === void 0)
    throw new Error();
  const r = new Qe({
    default_key_size: t
  });
  r.setPublicKey(n);
  const i = r.encrypt(e);
  if (typeof i == "boolean")
    throw new Error("RSA encrypt failed");
  return i;
}, _n = (n, e, t = "2048") => {
  if (pt.isEmpty(n))
    throw new Error("private key must be provided");
  if (pt.isEmpty(e))
    throw new Error("raw must be provided");
  if (window === void 0)
    throw new Error();
  const r = new Qe({
    default_key_size: t
  });
  r.setPrivateKey(n);
  const i = r.decrypt(e);
  if (typeof i == "boolean")
    throw new Error("RSA decrypt failed");
  return i;
}, Wn = (n) => new Promise((e, t) => {
  if (n instanceof File) {
    const r = new H.ArrayBuffer(), i = new FileReader();
    i.addEventListener("load", ({ target: s }) => {
      s && s.result instanceof ArrayBuffer ? (r.append(s.result), e(r.end())) : t(new Error("Read file failed"));
    }), i.addEventListener("error", (s) => t(s)), i.readAsArrayBuffer(n);
  } else if (n instanceof ArrayBuffer) {
    const r = new H.ArrayBuffer();
    r.append(n), e(r.end());
  } else if (typeof n == "string") {
    const r = new H();
    r.append(n), e(r.end());
  } else
    t(new Error("unsupport parameter type"));
}), Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  RSAEncrypt: In,
  RSADecrypt: _n,
  MD5: Wn
}, Symbol.toStringTag, { value: "Module" })), ir = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IFdPUktFUl9OQU1FPSJXb3JrZXI6VHJlZSIsVHJlZVdvcmtlcj17Y29weTp0PT57aWYodHlwZW9mIHQhPSJvYmplY3QifHx0PT09bnVsbClyZXR1cm4gdDtpZih0PT09bnVsbClyZXR1cm4gbnVsbDtpZihBcnJheS5pc0FycmF5KHQpKXJldHVyblsuLi50XS5tYXAobj0+VHJlZVdvcmtlci5jb3B5KG4pKTtpZih0IGluc3RhbmNlb2YgU2V0KXJldHVybiBuZXcgU2V0KFsuLi50XSk7aWYodCBpbnN0YW5jZW9mIE1hcClyZXR1cm4gbmV3IE1hcChbLi4udF0pO2NvbnN0IGU9e307cmV0dXJuIE9iamVjdC5rZXlzKHQpLmZvckVhY2gobj0+e2NvbnN0IHI9UmVmbGVjdC5nZXQodCxuKTtSZWZsZWN0LnNldChlLG4sVHJlZVdvcmtlci5jb3B5KHIpKX0pLGV9LGZsYXRUcmVlOih0PVtdLGU9ImNoaWxkcmVuIik9Pntjb25zdCBuPVtdO3JldHVybiB0LmZvckVhY2gocj0+e24ucHVzaChyKSxBcnJheS5pc0FycmF5KHJbZV0pJiZuLnB1c2goLi4uVHJlZVdvcmtlci5mbGF0VHJlZShyW2VdLGUpKX0pLG59LGJ1aWxkVHJlZToodD1bXSxlPSJwYXJlbnRJZCIsbj0iaWQiLHI9InBhdGgiLGk9W10pPT57aWYoIUFycmF5LmlzQXJyYXkodCkpcmV0dXJuW107Y29uc3Qgbz1BcnJheS5pc0FycmF5KHIpP3I6W3JdLGE9dC5tYXAoZj0+e2NvbnN0IGQ9VHJlZVdvcmtlci5jb3B5KGYpO3JldHVybiBvLmZvckVhY2gobD0+e2RbYF9fJHtsfWBdPVtmW2xdXX0pLGR9KSxzPWEuZmlsdGVyKGY9PmZbZV09PT0idW5kZWZpbmVkInx8ZltlXT09PSJudWxsInx8ZltlXT09PXZvaWQgMHx8ZltlXT09PW51bGw/ITA6aS5pbmNsdWRlcyhmW2VdKSksdT0oZj1bXSxkPVtdKT0+e2YuZm9yRWFjaChsPT57ZC5mb3JFYWNoKGM9PntjW2VdPT09bFtuXSYmKHUoW2NdLGQpLEFycmF5LmlzQXJyYXkobC5jaGlsZHJlbik/bC5jaGlsZHJlbi5wdXNoKFRyZWVXb3JrZXIuY29weShjKSk6bC5jaGlsZHJlbj1bVHJlZVdvcmtlci5jb3B5KGMpXSxvLmZvckVhY2goeT0+e0FycmF5LmlzQXJyYXkoY1tgJHt5fUluZGV4YF0pJiZjW2BfXyR7eX1gXS51bnNoaWZ0KGxbeV0pfSkpfSl9KX07cmV0dXJuIHUocyxhKSxzfSxmaWx0ZXJUcmVlOih0LGUsbj0hMCxyKT0+QXJyYXkuaXNBcnJheSh0KT9uPT09ITA/dC5maWx0ZXIoaT0+aVtlXT09PSJ1bmRlZmluZWQifHxpW2VdPT09bnVsbHx8cGFyc2VJbnQoaVtlXS50b1N0cmluZygpLDEwKTwwfHxpW2VdPT09cnx8cGFyc2VJbnQoU3RyaW5nKGlbZV0pLDEwKT09PXBhcnNlSW50KFN0cmluZyhyKSwxMCkpOnQuZmlsdGVyKGk9PmlbZV09PT1yfHxwYXJzZUludChTdHJpbmcoaVtlXSksMTApPT09cGFyc2VJbnQoU3RyaW5nKHIpLDEwKSk6W10scmVidWlsZFRyZWU6KGRhdGEsYnVpbGRlclN0cixvcHRpb25zPXt9KT0+e2lmKHR5cGVvZiBidWlsZGVyU3RyIT0ic3RyaW5nIilyZXR1cm5bXTtjb25zdCBidWlsZGVyPWV2YWwoYnVpbGRlclN0cik7aWYodHlwZW9mIGJ1aWxkZXIhPSJmdW5jdGlvbiIpcmV0dXJuW107aWYoQXJyYXkuaXNBcnJheShkYXRhKSl7Y29uc3R7Y2hpbGRyZW5LZXk6dD0iY2hpbGRyZW4iLGlkS2V5OmUsbGFzdFNlcXVlbmNlOm49W10sbGFzdEluZGV4OnI9W10sZXh0cmE6aX09b3B0aW9ucztyZXR1cm4gZGF0YS5tYXAoKG8sYSk9Pntjb25zdCBzPWU9PW51bGx8fGU9PT0iIj9hOm9bZV0sdT1bLi4ubixzXSxmPVsuLi5yLGFdLGQ9VHJlZVdvcmtlci5yZWJ1aWxkVHJlZShBcnJheS5pc0FycmF5KG9bdF0pP29bdF06W10sYnVpbGRlci50b1N0cmluZygpLHsuLi5vcHRpb25zLGxhc3RTZXF1ZW5jZTp1LGxhc3RJbmRleDpmfSk7cmV0dXJuey4uLmJ1aWxkZXIoe2RhdGE6byxpbmRleDphLHNlcXVlbmNlOnUsaW5kZXhTZXF1ZW5jZTpmLGlzTGVhZjpkLmxlbmd0aD09PTB9LGkpLGNoaWxkcmVuOmR9fSl9cmV0dXJuW119LHJlYnVpbGRUcmVlRmFzdDoodCxlPXt9KT0+e2lmKEFycmF5LmlzQXJyYXkodCkpe2NvbnN0e2NoaWxkcmVuS2V5Om49ImNoaWxkcmVuIixpZEtleTpyLGxhc3RTZXF1ZW5jZTppPVtdLGxhc3RJbmRleDpvPVtdfT1lO3JldHVybiB0Lm1hcCgoYSxzKT0+e2NvbnN0IHU9cj09bnVsbHx8cj09PSIiP3M6YVtyXSxmPVsuLi5pLHVdLGQ9Wy4uLm8sc10sbD1UcmVlV29ya2VyLnJlYnVpbGRUcmVlRmFzdChBcnJheS5pc0FycmF5KGFbbl0pP2Fbbl06W10se2NoaWxkcmVuS2V5Om4saWRLZXk6cixsYXN0U2VxdWVuY2U6ZixsYXN0SW5kZXg6ZH0pO3JldHVybnsuLi5hLF9fZGF0YTphLF9faW5kZXg6cyxfX3NlcXVlbmNlOmYsX19pbmRleFNlcXVlbmNlOmQsX19pc0xlYWY6bC5sZW5ndGg9PT0wLF9fY2hpbGRyZW46bH19KX1yZXR1cm5bXX0sZmluZFRyZWVOb2RlOihkYXRhLG9wdGlvbnM9e30pPT57aWYoQXJyYXkuaXNBcnJheShkYXRhKSl7Y29uc3R7dGFyZ2V0S2V5LHRhcmdldFZhbHVlLGNoaWxkcmVuS2V5PSJjaGlsZHJlbiIsaXNMZWFmPSExLHZhbGlkYXRvcjp2YWxpZGF0b3JTdHIsZXh0cmF9PW9wdGlvbnMsdmFsaWRhdG9yPXR5cGVvZiB2YWxpZGF0b3JTdHI9PSJzdHJpbmciP2V2YWwodmFsaWRhdG9yU3RyKTp2b2lkIDA7aWYodHlwZW9mIHRhcmdldEtleT09InN0cmluZyIpcmV0dXJuIFRyZWVXb3JrZXIuZmluZFRyZWVOb2RlQnlLZXkoZGF0YSx0YXJnZXRLZXksdGFyZ2V0VmFsdWUse2NoaWxkcmVuS2V5LGlzTGVhZn0pO2lmKHR5cGVvZiB2YWxpZGF0b3I9PSJmdW5jdGlvbiIpcmV0dXJuIFRyZWVXb3JrZXIuZmluZFRyZWVOb2RlQnlWYWxpZGF0b3IoZGF0YSx2YWxpZGF0b3Ise2NoaWxkcmVuS2V5LGlzTGVhZixleHRyYX0pfX0sZmluZFRyZWVOb2RlQnlLZXk6KHQsZSxuPXZvaWQgMCxyKT0+e2NvbnN0e2NoaWxkcmVuS2V5OmksaXNMZWFmOm99PXI7Zm9yKGNvbnN0IGEgb2YgdClpZihBcnJheS5pc0FycmF5KGFbaV0pJiZhW2ldLmxlbmd0aD4wKXtpZighbyYmUmVmbGVjdC5nZXQoYSxlKT09PW4pcmV0dXJuIGE7Y29uc3Qgcz1UcmVlV29ya2VyLmZpbmRUcmVlTm9kZUJ5S2V5KGFbaV0sZSxuLHIpO2lmKHMpcmV0dXJuIHN9ZWxzZSBpZihSZWZsZWN0LmdldChhLGUpPT09bilyZXR1cm4gYX0sZmluZFRyZWVOb2RlQnlWYWxpZGF0b3I6KHQsZSxuKT0+e2NvbnN0e2NoaWxkcmVuS2V5OnIsaXNMZWFmOmksZXh0cmE6b309bjtmb3IoY29uc3QgYSBvZiB0KWlmKEFycmF5LmlzQXJyYXkoYVtyXSkmJmFbcl0ubGVuZ3RoPjApe2lmKCFpJiZlKGEpKXJldHVybiBhO2NvbnN0IHM9VHJlZVdvcmtlci5maW5kVHJlZU5vZGVCeVZhbGlkYXRvcihhW3JdLGUsbik7aWYocylyZXR1cm4gc31lbHNlIGlmKGUoYSxvKSlyZXR1cm4gYX0sZmluZFRyZWVOb2RlczooZGF0YSxvcHRpb25zPXt9KT0+e2lmKEFycmF5LmlzQXJyYXkoZGF0YSkpe2NvbnN0e3RhcmdldEtleSx0YXJnZXRWYWx1ZSxjaGlsZHJlbktleT0iY2hpbGRyZW4iLGlzTGVhZj0hMSx2YWxpZGF0b3I6dmFsaWRhdG9yU3RyLGV4dHJhfT1vcHRpb25zLHZhbGlkYXRvcj10eXBlb2YgdmFsaWRhdG9yU3RyPT0ic3RyaW5nIj9ldmFsKHZhbGlkYXRvclN0cik6dm9pZCAwO2lmKHR5cGVvZiB0YXJnZXRLZXk9PSJzdHJpbmciKXJldHVybiBUcmVlV29ya2VyLmZpbmRUcmVlTm9kZXNCeUtleShkYXRhLHRhcmdldEtleSx0YXJnZXRWYWx1ZSx7Y2hpbGRyZW5LZXksaXNMZWFmfSk7aWYodHlwZW9mIHZhbGlkYXRvcj09ImZ1bmN0aW9uIilyZXR1cm4gVHJlZVdvcmtlci5maW5kVHJlZU5vZGVzQnlWYWxpZGF0b3IoZGF0YSx2YWxpZGF0b3Ise2NoaWxkcmVuS2V5LGlzTGVhZixleHRyYX0pfX0sZmluZFRyZWVOb2Rlc0J5S2V5KHQsZSxuPXZvaWQgMCxyKXtjb25zdCBpPVtdLHtjaGlsZHJlbktleTpvLGlzTGVhZjphfT1yO2Zvcihjb25zdCBzIG9mIHQpUmVmbGVjdC5nZXQocyxlKT09PW4mJihhPyghQXJyYXkuaXNBcnJheShzW29dKXx8QXJyYXkuaXNBcnJheShzW29dKSYmc1tvXS5sZW5ndGg9PT0wKSYmaS5wdXNoKHMpOmkucHVzaChzKSksQXJyYXkuaXNBcnJheShzW29dKSYmc1tvXS5sZW5ndGg+MCYmaS5wdXNoKC4uLlRyZWVXb3JrZXIuZmluZFRyZWVOb2Rlc0J5S2V5KHNbb10sZSxuLHIpKTtyZXR1cm4gaX0sZmluZFRyZWVOb2Rlc0J5VmFsaWRhdG9yKHQsZSxuKXtjb25zdCByPVtdLHtjaGlsZHJlbktleTppLGlzTGVhZjpvLGV4dHJhOmF9PW47Zm9yKGNvbnN0IHMgb2YgdCllKHMsYSkmJihvPyghQXJyYXkuaXNBcnJheShzW2ldKXx8QXJyYXkuaXNBcnJheShzW2ldKSYmc1tpXS5sZW5ndGg9PT0wKSYmci5wdXNoKHMpOnIucHVzaChzKSksQXJyYXkuaXNBcnJheShzW2ldKSYmc1tpXS5sZW5ndGg+MCYmci5wdXNoKC4uLlRyZWVXb3JrZXIuZmluZFRyZWVOb2Rlc0J5VmFsaWRhdG9yKHNbaV0sZSxuKSk7cmV0dXJuIHJ9fTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7dGFza0lkOnQsbWV0aG9kOmUsYXJnczpufX0pPT57Y29uc3Qgcj1gWyR7bmV3IERhdGUoKS50b0xvY2FsZVN0cmluZygpfV1bJHtXT1JLRVJfTkFNRX06JHtlfV1gLGk9RGF0ZS5ub3coKTtpZihSZWZsZWN0LmhhcyhUcmVlV29ya2VyLGUpKXtjb25zb2xlLmRlYnVnKGAke3J9OiBtZXRob2QgdHJpZ2dlcmVkYCxuKTt0cnl7Y29uc3Qgbz1UcmVlV29ya2VyW2VdKC4uLm4pO3Bvc3RNZXNzYWdlKHtjb2RlOjAsdGFza0lkOnQsZGF0YTpvLGVycm9yOm51bGx9KSxjb25zb2xlLmRlYnVnKGAke3J9OiBjb3N0ICR7RGF0ZS5ub3coKS1pfW1zYCl9Y2F0Y2gobyl7cG9zdE1lc3NhZ2Uoe2NvZGU6LTEsdGFza0lkOnQsZGF0YTpudWxsLGVycm9yOm99KX19ZWxzZSBwb3N0TWVzc2FnZSh7Y29kZTotMSx0YXNrSWQ6dCxkYXRhOm51bGwsZXJyb3I6bmV3IEVycm9yKCJtZXRob2Qgbm90IGZvdW5kIil9KSxjb25zb2xlLmRlYnVnKGAke3J9OiBtZXRob2Qgbm90IGZvdW5kYCl9KX0pKCk7Cg==", Ae = typeof window < "u" && window.Blob && new Blob([atob(ir)], { type: "text/javascript;charset=utf-8" });
function St() {
  const n = Ae && (window.URL || window.webkitURL).createObjectURL(Ae);
  try {
    return n ? new Worker(n) : new Worker("data:application/javascript;base64," + ir);
  } finally {
    n && (window.URL || window.webkitURL).revokeObjectURL(n);
  }
}
const Ln = (n, e) => new Promise((t, r) => {
  if (!window.Worker)
    r(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const i = new St();
    i.addEventListener("message", ({ data: { code: s, data: o, error: a } }) => {
      s === 0 ? t(o) : r(a);
    }), i.addEventListener("error", (s) => r(s)), i.postMessage({
      method: "flatTree",
      args: [n, e]
    });
  }
}), Pn = (n, e = "parentId", t = "id", r = [], i = []) => new Promise((s, o) => {
  if (!window.Worker)
    o(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const a = new St();
    a.addEventListener("message", ({ data: { code: f, data: T, error: C } }) => {
      f === 0 ? s(T) : o(C);
    }), a.addEventListener("error", (f) => o(f)), a.postMessage({ method: "buildTree", args: [n, e, t, r, i] });
  }
}), Xn = (n, e, t = !0, r) => new Promise((i, s) => {
  if (!window.Worker)
    s(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const o = new St();
    o.addEventListener("message", ({ data: { code: a, data: f, error: T } }) => {
      a === 0 ? i(f) : s(T);
    }), o.addEventListener("error", (a) => s(a)), o.postMessage({
      method: "filterTree",
      args: [n, e, t, r]
    });
  }
}), Hn = (n, e, t = {}) => new Promise((r, i) => {
  if (!window.Worker)
    i(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const s = new St();
    s.addEventListener("message", ({ data: { code: a, data: f, error: T } }) => {
      a === 0 ? r(f) : i(T);
    });
    const o = typeof e == "function" ? e.toString() : void 0;
    s.addEventListener("error", (a) => i(a)), s.postMessage({ method: "rebuildTree", args: [n, o, t] });
  }
}), Gn = (n, e = {}) => new Promise((t, r) => {
  if (!window.Worker)
    r(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const i = new St();
    i.addEventListener("message", ({ data: { code: s, data: o, error: a } }) => {
      s === 0 ? t(o) : r(a);
    }), i.addEventListener("error", (s) => r(s)), i.postMessage({ method: "rebuildTreeFast", args: [n, e] });
  }
}), Kn = (n, e = {}) => new Promise((t, r) => {
  if (!window.Worker)
    r(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const i = new St();
    i.addEventListener("message", ({ data: { code: o, data: a, error: f } }) => {
      o === 0 ? t(a) : r(f);
    });
    const s = typeof e.validator == "function" ? e.validator.toString() : void 0;
    i.addEventListener("error", (o) => r(o)), i.postMessage({
      method: "findTreeNode",
      args: [
        n,
        {
          ...e,
          validator: s
        }
      ]
    });
  }
}), Mn = (n, e = {}) => new Promise((t, r) => {
  if (!window.Worker)
    r(new Error("Worker \u4E0D\u53D7\u6D4F\u89C8\u5668\u652F\u6301\uFF01"));
  else {
    const i = new St();
    i.addEventListener("message", ({ data: { code: o, data: a, error: f } }) => {
      o === 0 ? t(a) : r(f);
    });
    const s = typeof e.validator == "function" ? e.validator.toString() : void 0;
    i.addEventListener("error", (o) => r(o)), i.postMessage({
      method: "findTreeNodes",
      args: [
        n,
        {
          ...e,
          validator: s
        }
      ]
    });
  }
}), jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  flatTreeByWorker: Ln,
  buildTreeByWorker: Pn,
  filterTreeByWorker: Xn,
  rebuildTreeByWorker: Hn,
  rebuildTreeFastByWorker: Gn,
  findTreeNodeByWorker: Kn,
  findTreeNodesByWorker: Mn
}, Symbol.toStringTag, { value: "Module" })), kn = {
  ...xe,
  ...Nn
}, Jn = {
  ...Ue,
  ...jn
}, Un = {
  Array: Te,
  Browser: $r,
  Clipboard: nn,
  Coding: kn,
  Color: Oe,
  Common: pt,
  Date: Ie,
  Number: Ce,
  FormData: _e,
  Object: Ne,
  Privacy: Le,
  Storage: Pe,
  Tree: Jn,
  URI: Ye,
  Word: We,
  ...pt
};
export {
  Te as Array,
  $r as Browser,
  nn as Clipboard,
  kn as Coding,
  Oe as Color,
  pt as Common,
  Ie as Date,
  _e as FormData,
  Ce as Number,
  Ne as Object,
  Le as Privacy,
  Pe as Storage,
  Jn as Tree,
  Ye as URI,
  We as Word,
  Un as default
};
